/* ============================================================
   BASE.CSS — socle commun à toutes les pages du site
   Chargé AVANT nav-footer.css et les feuilles de page.
   Contient : tokens de couleur, reset minimal du body, accessibilité
   (focus visible, lien d'évitement, texte réservé aux lecteurs d'écran),
   boutons communs (.btn-primary / .btn-secondary, à faible spécificité
   pour que les feuilles de page puissent les surcharger).
============================================================ */

:root {
    --mc-navy:   #0b1e3d;
    --mc-navy-2: #142c56;
    --mc-red:    #c41e3a;
    --mc-red-dark: #a6172f;
    --mc-ivoire: #faf7f2;
    --mc-text:   #33455e;
    --mc-muted:  #64748b;   /* texte secondaire : 4.8:1 sur blanc / 4.5:1 sur ivoire (AA) — remplace #94a3b8 */
    --mc-green:  #166534;   /* « OFFERT » : 7:1 sur blanc */

    /* Rythme d'animation partagé */
    --mc-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --mc-transition-fast: 0.25s var(--mc-ease);
    --mc-transition-smooth: 0.6s var(--mc-ease);
}

body { margin: 0; font-family: 'Inter', sans-serif; color: var(--mc-text); background: #ffffff; }

/* ── Focus visible (clavier) : contour 3px marine, blanc sur fonds marine ── */
:focus-visible {
    outline: 3px solid var(--mc-navy);
    outline-offset: 2px;
}
.mc-site-header :focus-visible,
.mc-site-footer :focus-visible,
.mc-mini-panier-head :focus-visible,
.mc-cookie-banner :focus-visible,
.mc-bandeau-vacances :focus-visible,
.on-navy :focus-visible,
.on-navy:focus-visible {
    outline-color: #ffffff;
}
/* Les contrôles natifs masqués mais focusables (radio/checkbox en cartes) sont gérés par :has() dans chaque feuille */

/* ── Texte réservé aux lecteurs d'écran ── */
.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0; border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ── Lien d'évitement ── */
.mc-skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 11000;
    padding: 12px 18px;
    background: #ffffff;
    color: var(--mc-navy);
    font: 700 0.9rem 'Inter', sans-serif;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    text-decoration: none;
    transition: top 0.15s ease;
}
.mc-skip-link:focus { top: 0; outline: 3px solid var(--mc-navy); outline-offset: 0; }
main:focus { outline: none; }

/* ── Boutons communs (faible spécificité : :where) ── */
:where(.btn-primary, .btn-secondary) {
    display: inline-block;
    box-sizing: border-box;
    min-height: 44px;
    padding: 12px 28px;
    border-radius: 3px;
    font: 600 0.88rem 'Inter', sans-serif;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
:where(.btn-primary) { background: var(--mc-red); color: #ffffff; border: 1.5px solid var(--mc-red); }
:where(.btn-primary:hover) { background: var(--mc-red-dark); border-color: var(--mc-red-dark); transform: translateY(-1px); }
:where(.btn-secondary) { background: transparent; color: var(--mc-navy); border: 1.5px solid var(--mc-navy); }
:where(.btn-secondary:hover) { background: var(--mc-navy); color: #ffffff; }
:where(.btn-primary, .btn-secondary)[aria-disabled="true"],
:where(.btn-primary, .btn-secondary):disabled { opacity: 0.55; cursor: not-allowed; }

/* ── Apparition au scroll ──
   .reveal      : une section entière (ancien comportement, adouci)
   .reveal-item : une carte / un titre, ajouté par site-ux.js seulement pour ce qui est SOUS la ligne de flottaison ;
                  chaque élément apparaît quand il arrive à l'écran, avec un léger décalage (--reveal-delay).
   Courbe douce (démarrage et arrêt progressifs) plutôt que la courbe « sèche » d'avant ; sans JS, tout reste visible. */
:root { --mc-ease-reveal: cubic-bezier(0.33, 0.1, 0.25, 1); }
.reveal, .reveal-item.reveal-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.9s var(--mc-ease-reveal), transform 0.9s var(--mc-ease-reveal), border-color 0.25s ease;
    transition-delay: var(--reveal-delay, 0ms);
}
.reveal-visible, .reveal-item.reveal-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal-item.reveal-item { opacity: 1; transform: none; transition: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; }
}

/* ── Page de message (404, paiement non validé, etc.) ── */
.mc-page-message {
    background: var(--mc-ivoire);
    padding: 72px 20px 96px;
    min-height: 50vh;
    text-align: center;
}
.mc-page-message-inner { max-width: 560px; margin: 0 auto; }
.mc-page-message-code { font: 700 0.85rem 'Inter', sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mc-red); margin: 0 0 12px; }
.mc-page-message h1 { font-family: 'Playfair Display', serif; font-size: clamp(1.7rem, 4vw, 2.3rem); color: var(--mc-navy); margin: 0 0 14px; }
.mc-page-message p { line-height: 1.6; margin: 0 0 12px; }
.mc-page-message-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }

/* Images avec width/height (évite les décalages de mise en page) : la hauteur suit la largeur CSS.
   :where() = spécificité nulle, donc n'écrase jamais une règle de hauteur explicite d'une feuille de page. */
:where(img[width][height]) { height: auto; }

/* ── Promotions sur articles : prix barré, badge, mention légale ── */
.mc-prix-barre { color: var(--mc-muted); text-decoration: line-through; font-weight: 400; margin-right: 6px; }
.mc-prix-promo { color: var(--mc-red-dark); font-weight: 700; }
.mc-promo-badge {
    display: inline-block;
    background: var(--mc-red);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    padding: 6px 10px;
    border-radius: 999px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.mc-promo-note { margin: 6px 0 0; font-size: 0.78rem; line-height: 1.45; color: var(--mc-muted); }
.mc-promo-info { margin: 4px 0 0; }
/* Sur les fiches produit, les thèmes ont des fonds variés (clairs ou sombres) : le texte hérite de la couleur du thème */
.mc-promo-info .mc-prix-barre { color: inherit; opacity: 0.7; }
.mc-promo-info .mc-promo-note { color: inherit; opacity: 0.8; }
/* Badge de promotion sur les cartes produit (boutique et accueil) */
.prod-card .mc-promo-badge, .acc-produit-card .mc-promo-badge {
    position: absolute; top: 12px; left: 12px; z-index: 2;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Badge d'article choisi par l'admin (cartes de la boutique et de l'accueil) */
.mc-card-badge {
    position: absolute; top: 12px; right: 12px; z-index: 2;
    max-width: 62%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-family: 'Inter', sans-serif; font-size: 0.7rem; font-weight: 700; line-height: 1.2;
    padding: 6px 12px; border-radius: 20px; color: #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.mc-card-badge--rouge  { background: var(--mc-red); }
.mc-card-badge--marine { background: var(--mc-navy); }
.mc-card-badge--vert   { background: var(--mc-green); }
.mc-card-badge--or     { background: #f0c14b; color: var(--mc-navy); }

html.mc-sans-animation *,
html.mc-sans-animation *::before,
html.mc-sans-animation *::after {
    animation-duration: 0.001s !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
}
