/* ==========================================================
   CARTE DES VINS V2.4 — LES RÉSISTANTS
   Miroir fidèle de l'affichage HTML officiel
   - DOMAINE en MAJUSCULES letter-spaced (style original)
   - Vigneron · Village sur ligne séparée gris
   - Année · Appellation · Prix · garde
   - Soulignage onglets via box-shadow inset (net droit)
   ========================================================== */

.cvlr-carte {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 20px;
    color: #1A1815;
    font-family: 'Fira Code', 'Courier New', monospace;
}


/* ============================================
   HEADER
   ============================================ */

.cvlr-header {
    text-align: center;
    margin-bottom: 60px;
}

.cvlr-kicker {
    font-family: 'Outfit', -apple-system, sans-serif !important;
    font-size: 11px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #2D5530;
    margin: 0 0 24px 0;
    font-weight: 500;
}

.cvlr-title {
    font-family: 'Outfit', sans-serif !important;
    font-size: 48px;
    font-weight: 400;
    color: #1A1815;
    margin: 0 0 20px 0;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.cvlr-subtitle {
    font-family: 'Outfit', sans-serif !important;
    font-size: 13px;
    color: #1A1815;
    opacity: 0.7;
    margin: 0 0 12px 0;
    letter-spacing: 0.3px;
}

.cvlr-updated {
    font-family: 'Outfit', sans-serif !important;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #1A1815;
    opacity: 0.4;
    margin: 0;
}


/* ============================================
   ONGLETS — SOULIGNAGE NET (box-shadow inset)
   ============================================ */

html body .cvlr-tabs button.cvlr-tab,
html body .cvlr-subtabs button.cvlr-subtab {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background: transparent !important;
    background-image: none !important;
    background-color: transparent !important;
    border: 0 none transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    text-decoration: none !important;
    text-decoration-line: none !important;
    text-decoration-color: transparent !important;
    text-underline-offset: 0 !important;
    font-family: 'Outfit', sans-serif !important;
    cursor: pointer !important;
    margin: 0 !important;
    position: relative !important;
    white-space: nowrap !important;
    line-height: 1.4 !important;
    display: inline-flex !important;
    align-items: baseline !important;
}

html body .cvlr-tabs button.cvlr-tab::before,
html body .cvlr-subtabs button.cvlr-subtab::before,
html body .cvlr-tabs button.cvlr-tab::after,
html body .cvlr-subtabs button.cvlr-subtab::after {
    display: none !important;
    content: none !important;
}

/* Onglets principaux */
html body .cvlr-tabs {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 32px !important;
    margin: 0 0 50px 0 !important;
    padding: 0 !important;
    border-bottom: 1px solid rgba(26, 24, 21, 0.15) !important;
}

html body .cvlr-tabs button.cvlr-tab {
    padding: 6px 0 16px 0 !important;
    color: #1A1815 !important;
    opacity: 0.85 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    letter-spacing: 3px !important;
    text-transform: uppercase !important;
    gap: 6px !important;
    transition: color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease !important;
    margin-bottom: -1px !important;
}

html body .cvlr-tabs button.cvlr-tab:hover {
    opacity: 1 !important;
    color: #2D5530 !important;
}

html body .cvlr-tabs button.cvlr-tab.cvlr-tab-active {
    color: #2D5530 !important;
    opacity: 1 !important;
    box-shadow: inset 0 -2px 0 0 #2D5530 !important;
}

html body .cvlr-tabs .cvlr-tab-name {
    font-weight: 500 !important;
}

html body .cvlr-tabs .cvlr-tab-count {
    font-size: 10px !important;
    opacity: 0.55 !important;
    font-weight: 400 !important;
    letter-spacing: 1px !important;
}

/* Sous-onglets régions */
html body .cvlr-subtabs {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 22px !important;
    margin: 0 0 50px 0 !important;
    padding: 0 !important;
    border-bottom: 1px solid rgba(26, 24, 21, 0.1) !important;
}

html body .cvlr-subtabs button.cvlr-subtab {
    padding: 4px 0 14px 0 !important;
    color: #1A1815 !important;
    opacity: 0.7 !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    letter-spacing: 2.5px !important;
    text-transform: uppercase !important;
    gap: 4px !important;
    transition: color 0.2s ease, opacity 0.2s ease !important;
    margin-bottom: -1px !important;
}

html body .cvlr-subtabs button.cvlr-subtab:hover {
    opacity: 1 !important;
    color: #2D5530 !important;
    box-shadow: none !important;
}

html body .cvlr-subtabs button.cvlr-subtab.cvlr-subtab-active {
    color: #2D5530 !important;
    opacity: 1 !important;
    box-shadow: inset 0 -2px 0 0 #2D5530 !important;
}

html body .cvlr-subtabs .cvlr-subtab-count {
    font-size: 10px !important;
    opacity: 0.5 !important;
    font-weight: 400 !important;
    letter-spacing: 0.5px !important;
}

/* Sous-onglet Vin de France : italique pour le distinguer */
html body .cvlr-subtabs button.cvlr-subtab-vdf {
    font-style: italic;
    opacity: 0.6;
}

html body .cvlr-subtabs button.cvlr-subtab-vdf:hover {
    opacity: 0.9;
}


/* ============================================
   PANNEAUX
   ============================================ */

.cvlr-panels {
    margin-bottom: 60px;
}

.cvlr-panel {
    animation: cvlrFadeIn 0.4s ease-out;
}

.cvlr-panel[hidden] {
    display: none;
}

@keyframes cvlrFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}


/* ============================================
   RÉGION
   ============================================ */

.cvlr-region {
    margin-bottom: 50px;
}

.cvlr-region-wrap:last-child .cvlr-region {
    margin-bottom: 0;
}

.cvlr-region-nom {
    font-family: 'Outfit', sans-serif !important;
    font-size: 24px;
    font-weight: 400;
    color: #2D5530;
    margin: 0 0 30px 0;
    padding-bottom: 14px;
    border-bottom: 1px solid #2D5530;
    letter-spacing: -0.3px;
}

/* Section Vin de France : titre en italique pour la distinguer */
.cvlr-region-vdf .cvlr-region-nom {
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    font-style: italic;
    font-size: 26px;
    letter-spacing: 0;
    font-weight: 400;
}

/* Ligne de séparation au-dessus de la section VDF */
.cvlr-region-wrap-vdf {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px dotted rgba(26, 24, 21, 0.2);
}


/* ============================================
   DOMAINE
   Hiérarchie visuelle améliorée
   ============================================ */

.cvlr-domaine {
    margin-bottom: 40px;
    padding-top: 4px;
}

.cvlr-domaine:last-child {
    margin-bottom: 0;
}

.cvlr-domaine-nom {
    font-family: 'Outfit', sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #2D5530 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    margin: 0 0 6px 0 !important;
    line-height: 1.3 !important;
}

.cvlr-domaine-meta {
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    font-style: italic !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #1A1815 !important;
    opacity: 0.7 !important;
    margin: 0 0 18px 0 !important;
    letter-spacing: 0.2px !important;
    line-height: 1.4 !important;
}


/* ============================================
   LIGNE VIN
   Cuvée [leader dots] Année · Appellation · Prix
   Étalement sur toute la largeur
   ============================================ */

.cvlr-vins {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cvlr-vin {
    display: flex;
    align-items: baseline;
    gap: 0;
    padding: 10px 0;
    border-bottom: 1px dotted rgba(26, 24, 21, 0.1);
}

.cvlr-vin:last-child {
    border-bottom: none;
}

.cvlr-vin-nom {
    font-family: 'Fira Code', 'Courier New', monospace !important;
    font-size: 14px;
    font-weight: 400;
    color: #1A1815;
    line-height: 1.5;
    flex: 0 0 auto;
    margin-right: 16px;
}

/* Leader dots qui mangent l'espace disponible entre cuvée et année */
.cvlr-vin-nom::after {
    content: "";
    display: inline-block;
    width: 0;
}

/* Spacer qui pousse les éléments à droite */
.cvlr-vin-spacer {
    flex: 1 1 auto;
    border-bottom: 1px dotted rgba(26, 24, 21, 0.25);
    margin: 0 12px 6px 0;
    min-width: 20px;
    align-self: flex-end;
    height: 1px;
}

.cvlr-vin-annee {
    font-family: 'Outfit', sans-serif !important;
    font-size: 12px;
    color: #1A1815;
    opacity: 0.55;
    white-space: nowrap;
    margin-right: 14px;
    flex: 0 0 auto;
}

.cvlr-vin-app {
    font-family: 'Outfit', sans-serif !important;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #1A1815;
    opacity: 0.4;
    white-space: nowrap;
    margin-right: 16px;
    flex: 0 0 auto;
}

.cvlr-vin-prix {
    font-family: 'Outfit', sans-serif !important;
    font-size: 14px;
    font-weight: 600;
    color: #1A1815;
    white-space: nowrap;
    flex: 0 0 auto;
    min-width: 48px;
    text-align: right;
}


/* ============================================
   BADGE MAGNUM
   ============================================ */

.cvlr-badge-mag {
    display: inline-block;
    font-family: 'Outfit', sans-serif !important;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 1px;
    color: #FBFAF6;
    background: #2D5530;
    padding: 2px 6px;
    border-radius: 2px;
    margin-left: 6px;
    vertical-align: 2px;
}


/* ============================================
   FOOTER
   ============================================ */

.cvlr-footer {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(26, 24, 21, 0.1);
    text-align: center;
}

.cvlr-note {
    font-family: 'Outfit', sans-serif !important;
    font-size: 11px;
    line-height: 1.7;
    color: #1A1815;
    opacity: 0.5;
    letter-spacing: 0.3px;
    margin: 0;
}


/* ============================================
   BLOC STATS DYNAMIQUES
   [carte_vins_stats] → 3 colonnes
   ============================================ */

.cvlr-stats {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    gap: 40px;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.cvlr-stat {
    text-align: center;
    flex: 1 1 0;
    min-width: 0;
}

.cvlr-stat-nb {
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    font-style: italic !important;
    font-size: 72px !important;
    font-weight: 400 !important;
    color: inherit !important;
    margin: 0 0 12px 0 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
}

.cvlr-stat-label {
    font-family: 'Outfit', sans-serif !important;
    font-size: 10px !important;
    letter-spacing: 3px !important;
    text-transform: uppercase !important;
    color: inherit !important;
    opacity: 0.6 !important;
    margin: 0 !important;
    font-weight: 500 !important;
}

@media (max-width: 767px) {
    .cvlr-stats {
        gap: 16px;
        padding: 16px 0;
    }
    
    .cvlr-stat-nb {
        font-size: 48px !important;
    }
    
    .cvlr-stat-label {
        font-size: 9px !important;
        letter-spacing: 2px !important;
    }
}


/* ============================================
   ERREUR
   ============================================ */

.cvlr-error {
    text-align: center;
    padding: 60px 20px;
    color: #1A1815;
    opacity: 0.6;
}

.cvlr-error p {
    font-family: 'Outfit', sans-serif !important;
    font-size: 15px;
}


/* ============================================
   RESPONSIVE — TABLETTE
   ============================================ */

@media (max-width: 1024px) {
    .cvlr-carte {
        padding: 50px 30px;
    }

    .cvlr-title {
        font-size: 40px;
    }

    .cvlr-region-nom {
        font-size: 22px;
    }

    html body .cvlr-tabs {
        gap: 24px !important;
    }
}


/* ============================================
   RESPONSIVE — MOBILE
   ============================================ */

@media (max-width: 767px) {
    .cvlr-carte {
        padding: 40px 16px;
    }

    .cvlr-header {
        margin-bottom: 40px;
    }

    .cvlr-title {
        font-size: 32px;
    }

    .cvlr-subtitle {
        font-size: 12px;
    }

    /* Onglets principaux : scroll horizontal (catégories peu nombreuses) */
    html body .cvlr-tabs {
        justify-content: flex-start !important;
        gap: 22px !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 0 16px !important;
        margin: 0 -16px 30px -16px !important;
    }

    html body .cvlr-tabs::-webkit-scrollbar {
        display: none !important;
    }

    html body .cvlr-tabs button.cvlr-tab {
        font-size: 11px !important;
        letter-spacing: 2.5px !important;
        flex-shrink: 0 !important;
    }

    /* Sous-onglets régions : WRAP en grille (pas de scroll horizontal) */
    html body .cvlr-subtabs {
        justify-content: center !important;
        gap: 14px 20px !important;
        flex-wrap: wrap !important;
        overflow-x: visible !important;
        padding: 16px 8px 18px 8px !important;
        margin: 0 -16px 40px -16px !important;
        background: rgba(45, 85, 48, 0.03) !important;
        border-top: 1px solid rgba(26, 24, 21, 0.08) !important;
        border-bottom: 1px solid rgba(26, 24, 21, 0.08) !important;
    }

    html body .cvlr-subtabs button.cvlr-subtab {
        font-size: 10px !important;
        letter-spacing: 1.5px !important;
        flex-shrink: 0 !important;
        padding: 2px 0 8px 0 !important;
    }

    .cvlr-region {
        margin-bottom: 40px;
    }

    .cvlr-region-nom {
        font-size: 20px;
        margin-bottom: 24px;
    }

    .cvlr-region-vdf .cvlr-region-nom {
        font-size: 22px;
    }

    .cvlr-domaine {
        margin-bottom: 32px;
    }

    .cvlr-domaine-nom {
        font-size: 13px !important;
        letter-spacing: 1.5px !important;
        margin-bottom: 4px !important;
    }

    .cvlr-domaine-meta {
        font-size: 13px !important;
        margin-bottom: 14px !important;
    }

    /* Sur mobile, le vin wrap proprement */
    .cvlr-vin {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        padding: 10px 0;
    }

    .cvlr-vin-spacer {
        display: none;
    }

    .cvlr-vin-nom {
        font-size: 13px;
        width: 100%;
        margin-right: 0;
    }

    .cvlr-vin-annee,
    .cvlr-vin-app {
        font-size: 10px;
        margin-right: 8px;
    }

    .cvlr-vin-prix {
        font-size: 13px;
        margin-top: 4px;
        color: #2D5530;
        min-width: 0;
        text-align: left;
    }

    .cvlr-footer {
        margin-top: 50px;
        padding-top: 30px;
    }
}


/* ============================================
   PRINT
   ============================================ */

@media print {
    .cvlr-carte {
        padding: 20px;
        color: #000;
        max-width: 100%;
    }

    html body .cvlr-tabs,
    html body .cvlr-subtabs {
        display: none !important;
    }

    .cvlr-panel,
    .cvlr-panel[hidden] {
        display: block !important;
    }

    .cvlr-region-wrap {
        display: block !important;
    }

    .cvlr-panel {
        page-break-after: always;
    }

    .cvlr-vin-prix {
        color: #000;
    }
}
