/**
 * Styles pour le module de vérification de stock dans les magasins
 */

/* Container principal */
.product-stores-stock-wrapper {
    margin: 2em 0;
    padding: 1.5em;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

/* Titre */
.stores-stock-title {
    margin: 0 0 1em 0;
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
}

/* Bouton de vérification */
.btn-check-stores-stock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    min-width: 220px;
}

.btn-check-stores-stock:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.btn-check-stores-stock:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-check-stores-stock.loading {
    background: #005a87;
}

/* Spinner */
.btn-loader {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    animation: rotate 2s linear infinite;
    width: 18px;
    height: 18px;
}

.spinner .path {
    stroke: #fff;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Zone de résultats */
.stores-stock-results {
    margin-top: 1.5em;
}

/* Message de chargement */
.stores-stock-loading {
    text-align: center;
    padding: 2em;
    color: #666;
}

/* Header de la liste */
.stores-list-header {
    margin-bottom: 1em;
    padding-bottom: 1em;
    border-bottom: 2px solid #ddd;
}

.stores-total {
    margin: 0;
    font-size: 1.1em;
    color: #333;
}

.stores-total strong {
    color: #0073aa;
}

.cached-notice {
    font-size: 0.85em;
    color: #666;
    font-style: italic;
}

/* Liste des magasins */
.stores-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1em;
}

/* Item magasin */
.store-item {
    padding: 1.25em;
    background: white;
    border-radius: 6px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.store-item:hover {
    border-color: #0073aa;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Header du magasin */
.store-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1em;
    margin-bottom: 0.5em;
}

.store-name {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    flex: 1;
}

/* Badge de stock */
.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #55B683 0%, #45a049 100%);
    color: white;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.stock-icon {
    width: 12px;
    height: 12px;
}

/* Informations du magasin */
.store-info {
    flex: 1;
}

/* =========================
 * Version simplifiée en liste
 * ========================= */

.or-stores-intro {
    margin: 0 0 8px 0;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.or-stores-box {
    border: 1px solid #EAEAEA;
    border-radius: 0;
    padding: 12px 15px;
    margin-bottom: 20px;
    background: #fff;
}

.or-stores-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.or-store-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 15px;
    color: #333;
    padding-bottom: 10px;
    padding-top: 10px;
}

.or-store-row,
.or-store-row span,
.or-store-row a {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
}

.or-store-row:not(:last-child) {
    border-bottom: 1px solid #EAEAEA;
}

.or-store-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #55B683;
    font-weight: 600;
}

.or-store-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #55B683;
    display: inline-block;
}

.or-store-name a {
    color: #000000;
    text-decoration: none;
    font-weight: 500;
}

.or-store-name a:hover {
    text-decoration: underline;
}

.or-store-extra {
    font-size: 12px;
    color: #777;
}

.or-stores-empty {
    padding: 12px 15px;
    border-radius: 3px;
    background: #fff8e1;
    font-size: 13px;
    color: #333;
}

.store-address,
.store-phone {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0.5em 0;
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
}

.address-icon,
.phone-icon {
    flex-shrink: 0;
    margin-top: 2px;
    opacity: 0.7;
}

/* Actions */
.store-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    padding-top: 1em;
    border-top: 1px solid #f0f0f0;
}

.btn-reserve-store,
.btn-visit-store {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    flex: 1;
    justify-content: center;
    min-width: 140px;
}

.btn-reserve-store {
    background: #0073aa;
    color: white;
}

.btn-reserve-store:hover {
    background: #005a87;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

.btn-visit-store {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.btn-visit-store:hover {
    background: #e8e8e8;
    color: #333;
    border-color: #ccc;
}

.btn-reserve-store svg,
.btn-visit-store svg {
    flex-shrink: 0;
}

/* Message "Aucun stock" */
.no-stock {
    padding: 2em;
    text-align: center;
    background: white;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
}

.no-stock p {
    margin: 0.5em 0;
    color: #666;
}

.no-stock p:first-child {
    font-size: 1.1em;
    font-weight: 500;
    color: #333;
}

.no-stock-help {
    font-size: 0.9em;
    color: #999;
}

/* Message d'erreur */
.error {
    padding: 1.5em;
    text-align: center;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
}

.error p {
    margin: 0.5em 0;
}

.error p:first-child {
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .stores-list {
        grid-template-columns: 1fr;
    }
    
    .store-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stock-badge {
        align-self: flex-start;
    }
    
    .store-actions {
        flex-direction: column;
    }
    
    .btn-reserve-store,
    .btn-visit-store {
        width: 100%;
    }
    
    .product-stores-stock-wrapper {
        padding: 1em;
        margin: 1.5em 0;
    }
}

@media (max-width: 480px) {
    .stores-stock-title {
        font-size: 1.1em;
    }
    
    .btn-check-stores-stock {
        width: 100%;
        font-size: 15px;
        padding: 10px 20px;
    }
    
    .store-item {
        padding: 1em;
    }
}

/* Animation d'apparition */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stores-list {
    animation: fadeIn 0.4s ease-out;
}

.store-item {
    animation: fadeIn 0.4s ease-out;
    animation-fill-mode: both;
}

.store-item:nth-child(1) { animation-delay: 0.05s; }
.store-item:nth-child(2) { animation-delay: 0.1s; }
.store-item:nth-child(3) { animation-delay: 0.15s; }
.store-item:nth-child(4) { animation-delay: 0.2s; }
.store-item:nth-child(5) { animation-delay: 0.25s; }
.store-item:nth-child(6) { animation-delay: 0.3s; }

