/*
 * Wakdo — Design system for the kiosk front (Bloc 1)
 *
 * Tokens extracted from the school maquette PDF:
 *   - Brand yellow  : #FFC72C  (M arches / button fills / card borders active)
 *   - Brand red     : #DA020E  (nav arrows in maquette — kept for potential future use)
 *   - Neutral dark  : #1A1A1A  (headings, primary text)
 *   - Neutral mid   : #4A4A4A  (body copy)
 *   - Neutral light : #F5F5F5  (page backgrounds, card backgrounds)
 *   - White         : #FFFFFF  (overlays, cards)
 *   - Border radius : 12px (cards), 8px (buttons)
 *   - Card border   : 2px solid #FFC72C when selected / active
 *
 * Kiosk target: 1080x1920 portrait (touch screen).
 * Base font stack: system-ui fallback (the school font is not available as a web asset).
 * Accessibility (RGAA Cr 1.c.2): the OpenDyslexic font (OFL 1.1) is self-hosted under
 *   assets/fonts (see @font-face in section 12). a11y.js adds the .dys-font class on
 *   <html> on demand, which redefines --font-family-base for the whole interface, and
 *   persists the choice in localStorage. Base stack is the default.
 */

/* ============================================================
   1. CSS CUSTOM PROPERTIES (design tokens)
   ============================================================ */

:root {
    /* Brand palette */
    --color-brand-yellow:    #FFC72C;
    --color-brand-yellow-dk: #E6A800; /* darker shade for focus/hover contrast */
    --color-brand-red:       #DA020E;
    --color-brand-dark:      #1A1A1A;

    /* Neutral palette */
    --color-text-primary:    #1A1A1A;
    --color-text-secondary:  #4A4A4A;
    --color-text-muted:      #767676; /* min WCAG AA contrast on white */
    --color-bg-page:         #F5F5F5;
    --color-bg-card:         #FFFFFF;
    --color-border-default:  #D1D1D1;
    --color-border-active:   #FFC72C;

    /* Typography */
    --font-family-base:  system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --font-size-xs:      0.75rem;   /* 12px */
    --font-size-sm:      0.875rem;  /* 14px */
    --font-size-base:    1rem;      /* 16px */
    --font-size-md:      1.25rem;   /* 20px */
    --font-size-lg:      1.5rem;    /* 24px */
    --font-size-xl:      2rem;      /* 32px */
    --font-size-2xl:     2.5rem;    /* 40px */
    --font-weight-normal: 400;
    --font-weight-bold:   700;

    /* Spacing scale (8px base) */
    --space-1:  0.25rem;  /*  4px */
    --space-2:  0.5rem;   /*  8px */
    --space-3:  0.75rem;  /* 12px */
    --space-4:  1rem;     /* 16px */
    --space-5:  1.5rem;   /* 24px */
    --space-6:  2rem;     /* 32px */
    --space-8:  3rem;     /* 48px */
    --space-10: 4rem;     /* 64px */

    /* Border radius */
    --radius-sm:   6px;
    --radius-md:   12px;
    --radius-lg:   20px;
    --radius-pill: 9999px;

    /* Shadows */
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.10);
    --shadow-overlay: 0 4px 32px rgba(0, 0, 0, 0.18);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    /* touch-action on html prevents accidental pinch-zoom on kiosk */
    touch-action: manipulation;
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
    background-color: var(--color-bg-page);
    line-height: 1.5;
    min-height: 100vh;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

/* ============================================================
   3. UTILITY CLASSES
   ============================================================ */

.sr-only {
    /* Screen-reader only — visually hidden but accessible (RGAA) */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   4. COMPONENT — WELCOME SCREEN (index.html)
   ============================================================ */

/*
 * Layout: full-viewport, background photo, centered white card.
 * The maquette shows the M logo arches as a background image (mc-landing-banner.png).
 * The white card floats left-center in the maquette; on 1080x1920 portrait we center it.
 */

.welcome {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    overflow: hidden;
}

.welcome__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

.welcome__card {
    position: relative;
    z-index: 1;
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-overlay);
    padding: var(--space-8) var(--space-8);
    max-width: 700px;
    width: 100%;
}

.welcome__greeting {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-5);
    line-height: 1.2;
}

.welcome__question {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-6);
    line-height: 1.4;
}

.welcome__choices {
    display: flex;
    gap: var(--space-5);
    flex-wrap: wrap;
}

.choice-btn {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-5) var(--space-4);
    background: var(--color-bg-card);
    border: 2px solid var(--color-border-default);
    border-radius: var(--radius-md);
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        transform var(--transition-fast);
    -webkit-tap-highlight-color: transparent; /* suppress blue flash on mobile tap */
    min-height: 200px;
    justify-content: center;
}

.choice-btn:hover,
.choice-btn:focus-visible {
    border-color: var(--color-border-active);
    box-shadow: 0 0 0 3px rgba(255, 199, 44, 0.35);
    outline: none;
    /* slight lift gives tactile feedback on kiosk screen */
    transform: translateY(-2px);
}

.choice-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.choice-btn__image {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

.choice-btn__label {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    text-align: center;
}

/* ============================================================
   5. COMPONENT — CATEGORIES SCREEN (categories.html)
   ============================================================ */

/*
 * Layout: header bar at top with logo, then a full-page category grid.
 * The maquette shows categories as a horizontal scrollable strip at the top
 * of the product-list screen. Here we present them as a full-page grid
 * (intermediate screen before the product list, P5 scope).
 * 3-column grid on portrait kiosk (1080px wide).
 */

.categories-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--color-bg-page);
}

/* ---------- header ---------- */

.site-header {
    background: var(--color-bg-card);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: var(--space-4) var(--space-6);
    /* Grille 3 colonnes : le logo (colonne centrale auto) reste centre quelles que
       soient les largeurs du bouton retour (gauche) et du badge/panier (droite).
       En flex + space-between, le logo derivait selon ces largeurs (ex: panier). */
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    /* Sticky so the logo stays visible while user scrolls categories */
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header__logo {
    height: 56px;
    width: auto;
    justify-self: center;
}

.site-header__mode {
    justify-self: end;
}

.site-header__back {
    display: inline-flex;
    justify-self: start;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-secondary);
    padding: var(--space-2) var(--space-4);
    border: 2px solid var(--color-border-default);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition-fast), color var(--transition-fast);
}

.site-header__back:hover,
.site-header__back:focus-visible {
    border-color: var(--color-border-active);
    color: var(--color-text-primary);
    outline: none;
}

/* ---------- main content area ---------- */

.categories-main {
    flex: 1;
    padding: var(--space-6) var(--space-6) var(--space-10);
}

.categories-main__heading {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.categories-main__sub {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-6);
}

/* ---------- category grid ---------- */

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
}

/*
 * Each category card is a link (<a>) styled as a card.
 * Large tap target (min 160px) for kiosk touch use.
 */
.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-5) var(--space-4);
    background: var(--color-bg-card);
    border: 2px solid var(--color-border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        transform var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
    min-height: 220px;
    justify-content: center;
    text-align: center;
}

.category-card:hover,
.category-card:focus-visible {
    border-color: var(--color-border-active);
    box-shadow: 0 0 0 3px rgba(255, 199, 44, 0.35), var(--shadow-card);
    outline: none;
    transform: translateY(-3px);
}

.category-card:active {
    transform: translateY(0);
    box-shadow: var(--shadow-card);
}

.category-card__image {
    width: 140px;
    height: 140px;
    object-fit: contain;
}

.category-card__label {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    /* Capitalize first letter to match maquette label style */
    text-transform: capitalize;
}

/* ============================================================
   6. RESPONSIVE — kiosk portrait 1080px is primary target.
   Desktop landscape / smaller tablets get a simplified layout.
   ============================================================ */

/* Landscape / wide desktop: welcome card can be wider */
@media (min-width: 1080px) {
    .welcome__card {
        max-width: 820px;
        padding: var(--space-10) var(--space-10);
    }

    .choice-btn__image {
        width: 150px;
        height: 150px;
    }

    .category-grid {
        /* 4 columns on very wide screens so the grid uses the space */
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Narrow screens (phones, small tablets) */
@media (max-width: 600px) {
    .welcome__card {
        padding: var(--space-5) var(--space-4);
    }

    .welcome__greeting {
        font-size: var(--font-size-xl);
    }

    .welcome__question {
        font-size: var(--font-size-base);
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .categories-main {
        padding: var(--space-4);
    }
}

/* Portrait kiosk explicit — enforce single-column choice layout below 480px */
@media (max-width: 480px) {
    .welcome__choices {
        flex-direction: column;
    }
}

/* ============================================================
   7. SHARED COMPONENTS — header extensions + badges + buttons
   ============================================================ */

/* Mode badge — shown in header for context */
.mode-badge {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    background: var(--color-brand-yellow);
    border-radius: var(--radius-pill);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    color: var(--color-brand-dark);
    white-space: nowrap;
}

.site-header__mode {
    /* Keeps mode badge aligned right in the header flex */
    margin-left: auto;
}

/* Minimal header variant (confirmation page — no back button) */
.site-header--minimal {
    justify-content: center;
}

/* Primary / secondary button primitives reused across pages */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-md);
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-bold);
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition:
        background var(--transition-fast),
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        transform var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
    /* Generous tap target for kiosk touch */
    min-height: 64px;
}

.btn--primary {
    background: var(--color-brand-yellow);
    color: var(--color-brand-dark);
}

.btn--primary:hover,
.btn--primary:focus-visible {
    background: var(--color-brand-yellow-dk);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 199, 44, 0.40);
    transform: translateY(-1px);
}

.btn--primary:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn--primary:disabled,
.btn--primary[aria-disabled="true"] {
    background: var(--color-border-default);
    color: var(--color-text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    pointer-events: none;
}

.btn--secondary {
    background: var(--color-bg-card);
    color: var(--color-text-primary);
    border-color: var(--color-border-default);
}

.btn--secondary:hover,
.btn--secondary:focus-visible {
    border-color: var(--color-border-active);
    outline: none;
}

.btn--large {
    font-size: var(--font-size-lg);
    padding: var(--space-5) var(--space-8);
    min-height: 80px;
}

/* ============================================================
   8. COMPONENT — PRODUCTS LIST (products.html)
   ============================================================ */

.products-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--color-bg-page);
}

.products-main {
    flex: 1;
    padding: var(--space-6);
}

.products-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-5);
    gap: var(--space-4);
    flex-wrap: wrap;
}

.products-main__heading {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
}

.products-error {
    color: var(--color-brand-red);
    font-size: var(--font-size-md);
    margin-bottom: var(--space-5);
}

.products-empty {
    color: var(--color-text-muted);
    font-size: var(--font-size-md);
    padding: var(--space-8) 0;
    text-align: center;
}

/* Product grid — 3 columns on kiosk portrait */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
    list-style: none;
    padding: 0;
    margin: 0;
}

/*
 * product-card — clickable card linking to product detail.
 * The <a> is the grid child; using display:flex so image + text stack.
 */
.product-card {
    display: flex;
    flex-direction: column;
    background: var(--color-bg-card);
    border: 2px solid var(--color-border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        transform var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
    color: inherit;
}

.product-card:hover,
.product-card:focus-visible {
    border-color: var(--color-border-active);
    box-shadow: 0 0 0 3px rgba(255, 199, 44, 0.35), var(--shadow-card);
    outline: none;
    transform: translateY(-3px);
}

.product-card:active {
    transform: translateY(0);
    box-shadow: var(--shadow-card);
}

/* Rupture de stock (RG-T21) : tuile visible mais non commandable. Grisee, non
   cliquable, sans effet de survol (l'image est attenuee, pas l'etat ne ment pas). */
.product-card--unavailable {
    opacity: 0.55;
    filter: grayscale(0.6);
    cursor: not-allowed;
}

.product-card--unavailable:hover,
.product-card--unavailable:focus-visible {
    border-color: var(--color-border-default);
    box-shadow: var(--shadow-card);
    transform: none;
}

/* Badge "Indisponible" superpose a l'image d'une tuile en rupture. */
.product-card__badge {
    position: absolute;
    top: var(--space-2);
    left: var(--space-2);
    z-index: 2;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    background: var(--color-brand-dark);
    color: #fff;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
}

.product-card__image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--color-bg-page);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-card__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: var(--space-3);
}

.product-card__body {
    padding: var(--space-3) var(--space-4) var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    flex: 1;
}

.product-card__name {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    line-height: 1.3;
}

.product-card__price {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-bold);
    color: var(--color-brand-dark);
}

/* ============================================================
   10. COMPONENT — QUANTITY CONTROLS (modale options produit)
   ============================================================ */

.qty-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--color-border-default);
    background: var(--color-bg-card);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
    /* Large tap target for kiosk */
}

.qty-btn:hover,
.qty-btn:focus-visible {
    border-color: var(--color-border-active);
    background: rgba(255, 199, 44, 0.10);
    outline: none;
}

.qty-value {
    min-width: 32px;
    text-align: center;
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-bold);
}

/* ============================================================
   11. COMPONENT — PAYMENT (payment.html)
   ============================================================ */

.payment-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--color-bg-page);
}

.payment-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-8) var(--space-6);
    gap: var(--space-8);
}

.payment-main__heading {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    text-align: center;
}

.payment-recap {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: var(--space-5) var(--space-6);
    text-align: center;
    width: 100%;
    max-width: 480px;
}

.payment-recap__mode {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-1);
}

.payment-recap__items {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2);
}

.payment-recap__total {
    font-size: var(--font-size-lg);
    color: var(--color-text-primary);
}

/* Two payment method buttons side by side */
.payment-methods {
    display: flex;
    gap: var(--space-6);
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 640px;
}

.payment-choice {
    flex: 1 1 220px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    padding: var(--space-6);
    background: var(--color-bg-card);
    border: 2px solid var(--color-border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    cursor: pointer;
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        transform var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
}

.payment-choice:hover,
.payment-choice:focus-visible {
    border-color: var(--color-border-active);
    box-shadow: 0 0 0 3px rgba(255, 199, 44, 0.35), var(--shadow-card);
    outline: none;
    transform: translateY(-3px);
}

.payment-choice:active {
    transform: translateY(0);
    box-shadow: var(--shadow-card);
}

.payment-choice__icon {
    width: 80px;
    height: 80px;
}

.payment-choice__label {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    text-align: center;
}

/* ============================================================
   12. COMPONENT — CONFIRMATION (confirmation.html)
   ============================================================ */

.confirmation-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--color-bg-page);
}

.confirmation-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-8) var(--space-6);
    gap: var(--space-8);
}

.confirmation-banner {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-overlay);
    padding: var(--space-8);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-5);
    text-align: center;
    max-width: 560px;
    width: 100%;
}

.confirmation-banner__check {
    width: 96px;
    height: 96px;
    /* Subtle entrance animation */
    animation: check-pop 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes check-pop {
    from { transform: scale(0.5); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.confirmation-banner__title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
}

.confirmation-banner__sub {
    font-size: var(--font-size-md);
    color: var(--color-text-secondary);
}

.confirmation-banner__number-block {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    background: var(--color-bg-page);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-6);
    min-width: 200px;
}

.confirmation-banner__number-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.confirmation-banner__number {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-brand-dark);
    letter-spacing: 0.04em;
}

.confirmation-banner__total {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
}

.confirmation-banner__delay {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
}

.confirmation-new-order {
    /* Full-width CTA on kiosk portrait */
    min-width: 320px;
}

/* ============================================================
   13. RESPONSIVE EXTENSIONS — new pages
   ============================================================ */

@media (max-width: 700px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .payment-methods {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-3);
    }

    .products-main {
        padding: var(--space-4);
    }
}

/* ============================================================
   14. COMPONENT — MENU COMPOSER MODAL (modale ouverte depuis la grille produits)
   ============================================================ */

/*
 * Overlay dims the page content while the composer is open.
 * z-index 200 sits above the sticky header (z-index 100).
 */
.composer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    /* Subtle fade-in so the overlay does not feel abrupt */
    animation: composer-fade-in var(--transition-base) both;
}

/* Modale de confirmation d'un geste destructeur (Abandon). */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 210;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    animation: composer-fade-in var(--transition-base) both;
}

.confirm-modal {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-overlay);
    padding: var(--space-6);
    max-width: 28rem;
    width: 100%;
    text-align: center;
}

.confirm-modal__message {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    margin: 0 0 var(--space-5);
}

.confirm-modal__actions {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    flex-wrap: wrap;
}

@keyframes composer-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* White container centred inside the overlay */
.composer-container {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-overlay);
    width: 100%;
    max-width: 1080px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Slide-up entrance from maquette aesthetic */
    animation: composer-slide-up var(--transition-base) both;
}

@keyframes composer-slide-up {
    from { transform: translateY(32px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ---------- Header ------------------------------------------ */

.composer-header {
    padding: var(--space-5) var(--space-6) var(--space-4);
    border-bottom: 1px solid var(--color-border-default);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    flex-shrink: 0;
}

.composer-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
}

/* Progress indicator */
.composer-progress {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.composer-progress__text {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    white-space: nowrap;
    min-width: 6rem;
}

.composer-progress__bar {
    flex: 1;
    height: 6px;
    background: var(--color-bg-page);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.composer-progress__fill {
    height: 100%;
    background: var(--color-brand-yellow);
    border-radius: var(--radius-pill);
    transition: width var(--transition-base);
}

/* ---------- Body -------------------------------------------- */

.composer-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-5) var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    /* Visible focus outline inside scrollable area */
    outline: none;
}

.composer-step__subtitle {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
}

/* ---------- Selectable card grid ----------------------------- */

.composer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-4);
    list-style: none;
    padding: 0;
    margin: 0;
}

/*
 * composer-card — button variant of the product card.
 * Displays image + name (+ price for burgers).
 * Uses aria-pressed to expose selection state to assistive tech.
 */
.composer-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-3) var(--space-4);
    background: var(--color-bg-card);
    border: 2px solid var(--color-border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    cursor: pointer;
    text-align: center;
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        transform var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.composer-card:hover,
.composer-card:focus-visible {
    border-color: var(--color-border-active);
    box-shadow: 0 0 0 3px rgba(255, 199, 44, 0.35), var(--shadow-card);
    outline: none;
    transform: translateY(-2px);
}

.composer-card:active {
    transform: translateY(0);
}

/* Selected state — mirrors aria-pressed=true */
.composer-card--selected {
    border-color: var(--color-brand-yellow-dk); /* jaune fonce : contraste a11y 1.4.11 */
    box-shadow: 0 0 0 3px rgba(230, 168, 0, 0.55), var(--shadow-card);
    background: rgba(255, 199, 44, 0.06);
}

.composer-card__image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    max-height: 120px;
    border-radius: var(--radius-sm);
}

.composer-card__name {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    line-height: 1.3;
}

/* ============================================================
 * Allergenes — bouton "i" + modale generale (14 INCO)
 * Info reglementaire generale (pas un calcul par produit). La modale reutilise
 * le pattern overlay du composer ; z-index 220 pour passer au-dessus de lui.
 * ============================================================ */

/* Le bouton "i" se superpose au coin de l'image de la carte. */
.product-card__image-wrap {
    position: relative;
}

.allergen-info-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 2px solid var(--color-brand-dark);
    background: var(--color-bg-card);
    color: var(--color-brand-dark);
    font-weight: var(--font-weight-bold);
    font-style: italic;
    font-size: var(--font-size-base);
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-overlay);
}

.product-card__image-wrap .allergen-info-btn {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    z-index: 2;
}

.allergen-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 220;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    animation: composer-fade-in var(--transition-base) both;
}

.allergen-modal {
    position: relative;
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-overlay);
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    padding: var(--space-6);
    animation: composer-slide-up var(--transition-base) both;
}

.allergen-modal-close {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    border: none;
    background: var(--color-bg-page);
    color: var(--color-text-primary);
    font-size: var(--font-size-md);
    cursor: pointer;
}

.allergen-modal-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.allergen-modal-intro {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-4);
}

.allergen-modal-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--space-2);
}

.allergen-modal-list li {
    padding: var(--space-2) var(--space-3);
    background: var(--color-bg-page);
    border-radius: var(--radius-md);
}

.allergen-name {
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
}

.allergen-desc {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

.composer-card__price {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

/* ---------- Personalisation checkboxes ----------------------- */

.composer-options {
    border: 1px solid var(--color-border-default);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.composer-options__legend {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-secondary);
    padding: 0 var(--space-2);
}

.composer-option-label {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
    cursor: pointer;
}

.composer-option-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--color-brand-yellow);
    cursor: pointer;
    flex-shrink: 0;
}

/* ---------- Taille toggle ------------------------------------ */

.composer-taille {
    display: flex;
    gap: var(--space-3);
    align-items: center;
    flex-wrap: wrap;
}

.composer-taille__btn {
    flex: 1 1 160px;
    padding: var(--space-3) var(--space-4);
    border: 2px solid var(--color-border-default);
    border-radius: var(--radius-md);
    background: var(--color-bg-card);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    cursor: pointer;
    transition:
        border-color var(--transition-fast),
        background var(--transition-fast),
        box-shadow var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: 56px;
}

.composer-taille__btn:hover,
.composer-taille__btn:focus-visible {
    border-color: var(--color-border-active);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 199, 44, 0.25);
}

/* Active/selected taille button */
.composer-taille__btn--active {
    border-color: var(--color-brand-yellow);
    background: rgba(255, 199, 44, 0.10);
}

/* Supplement price hint inside the Grande button */
.composer-taille__price-hint {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-normal);
    color: var(--color-text-muted);
    background: var(--color-bg-page);
    padding: 2px var(--space-2);
    border-radius: var(--radius-pill);
}

/* ---------- Recap (step 5) ----------------------------------- */

.composer-recap {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--color-border-default);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.composer-recap__line {
    display: flex;
    align-items: baseline;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
    border-bottom: 1px solid var(--color-border-default);
}

.composer-recap__line:last-child {
    border-bottom: none;
}

.composer-recap__icon {
    color: var(--color-brand-yellow);
    font-size: var(--font-size-xs);
    flex-shrink: 0;
}

.composer-recap__label {
    flex: 1;
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.composer-recap__opts {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.composer-recap__taille {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.composer-recap__suppl {
    font-size: var(--font-size-sm);
    color: var(--color-brand-yellow-dk);
    font-weight: var(--font-weight-bold);
}

/* Totals block below the recap list */
.composer-recap__totals {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-4) 0;
}

.composer-recap__base,
.composer-recap__suppl-total {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.composer-recap__total-line {
    font-size: var(--font-size-lg);
    color: var(--color-text-primary);
}

/* ---------- Footer ------------------------------------------ */

.composer-footer {
    flex-shrink: 0;
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--color-border-default);
    background: var(--color-bg-card);
}

.composer-footer__row {
    display: flex;
    gap: var(--space-4);
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.composer-footer__cancel {
    /* Pushed to the left so it is visually separated from the nav buttons */
    margin-right: auto;
}

/* ---------- Responsive — narrow screens --------------------- */

@media (max-width: 600px) {
    .composer-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: var(--space-3);
    }

    .composer-container {
        max-height: 95vh;
    }

    .composer-header,
    .composer-body,
    .composer-footer {
        padding-left: var(--space-4);
        padding-right: var(--space-4);
    }

    .composer-footer__row {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .composer-footer__cancel {
        margin-right: 0;
    }
}

/* === Panneau de commande persistant (L1 - maquette : recap a droite) =======
   Layout deux colonnes sur les ecrans de commande : contenu a gauche, panneau
   a droite, sticky pleine hauteur. Le panneau = entete (titre + mode), corps
   scrollable (lignes du panier), pied (total + Abandon/Payer). Reutilise les
   tokens de :root pour rester aligne sur la charte. */
.order-layout {
    display: flex;
    align-items: flex-start;
    gap: var(--space-5);
    padding: 0 var(--space-5) var(--space-5);
}

.order-layout > main {
    flex: 1 1 auto;
    min-width: 0; /* laisse la grille produits se retrecir au lieu de deborder */
}

.order-panel {
    flex: 0 0 360px;
    width: 360px;
    position: sticky;
    top: var(--space-4);
    max-height: calc(100vh - var(--space-6));
    display: flex;
    flex-direction: column;
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.order-panel__head {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--color-border-default);
}

.order-panel__logo {
    height: 22px;
    width: auto;
}

.order-panel__title {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-bold);
}

.order-panel__mode {
    margin-left: auto;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    background: var(--color-bg-page);
    border-radius: var(--radius-pill);
    padding: var(--space-1) var(--space-3);
}

.order-panel__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: var(--space-3) var(--space-4);
}

.order-panel__empty {
    color: var(--color-text-muted);
    text-align: center;
    padding: var(--space-6) var(--space-3);
    line-height: 1.5;
}

.order-panel__lines {
    list-style: none;
    margin: 0;
    padding: 0;
}

.order-panel__line {
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-border-default);
}

.order-panel__line:last-child {
    border-bottom: none;
}

.order-panel__line-main {
    display: flex;
    justify-content: space-between;
    gap: var(--space-2);
    font-weight: var(--font-weight-bold);
}

.order-panel__line-price {
    white-space: nowrap;
}

.order-panel__options {
    list-style: none;
    margin: var(--space-1) 0 0;
    padding: 0;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.order-panel__options li::before {
    content: "+ ";
}

/* Ligne de controles : stepper de quantite a gauche, retrait a droite. */
.order-panel__line-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--space-2);
}

.order-panel__qty {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* Boutons +/- : cible tactile confortable (borne). */
.order-panel__qty-btn {
    min-width: 44px;
    min-height: 44px;
    border: 2px solid var(--color-border-default);
    border-radius: var(--radius-sm);
    background: var(--color-bg-card);
    color: var(--color-text-primary);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    line-height: 1;
    cursor: pointer;
}

.order-panel__qty-value {
    min-width: 2ch;
    text-align: center;
    font-weight: var(--font-weight-bold);
}

.order-panel__remove {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border: none;
    background: none;
    cursor: pointer;
    line-height: 0;
}

.order-panel__foot {
    border-top: 1px solid var(--color-border-default);
    padding: var(--space-4) var(--space-5);
}

.order-panel__total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: var(--font-size-md);
    margin-bottom: var(--space-4);
}

.order-panel__total-value {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
}

.order-panel__actions {
    display: flex;
    gap: var(--space-3);
}

.order-panel__abandon,
.order-panel__pay {
    flex: 1 1 0;
    text-align: center;
    border-radius: var(--radius-pill);
    padding: var(--space-3) var(--space-4);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-base);
    cursor: pointer;
    text-decoration: none;
}

.order-panel__abandon {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-default);
    color: var(--color-text-secondary);
}

.order-panel__pay {
    background: var(--color-brand-yellow);
    border: 1px solid var(--color-brand-yellow);
    color: var(--color-text-primary);
}

.order-panel__pay[aria-disabled="true"] {
    opacity: 0.5;
    pointer-events: none;
}

/* Ecran etroit : le panneau passe sous le contenu (le kiosk reste large en
   pratique ; repli de surete pour les petits viewports). */
@media (max-width: 900px) {
    .order-layout {
        flex-direction: column;
    }

    .order-panel {
        width: auto;
        flex-basis: auto;
        position: static;
        max-height: none;
        align-self: stretch;
    }
}

/* === Bandeau categories (L1 - maquette : strip horizontal en haut) =========
   Cartes categorie defilantes avec fleches rouges ; la categorie courante porte
   une bordure jaune (charte maquette). Sticky en haut du contenu de commande. */
.category-strip {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) 0;
    position: sticky;
    top: 0;
    background: var(--color-bg-page);
    z-index: 5;
}

.category-strip__scroller {
    display: flex;
    gap: var(--space-3);
    overflow-x: auto;
    scroll-behavior: smooth;
    flex: 1 1 auto;
    scrollbar-width: none; /* Firefox : masque la scrollbar, on navigue aux fleches */
}

.category-strip__scroller::-webkit-scrollbar {
    display: none;
}

.category-strip__item {
    flex: 0 0 auto;
    width: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2);
    background: var(--color-bg-card);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    text-decoration: none;
    color: var(--color-text-primary);
    font-size: var(--font-size-sm);
    text-align: center;
}

.category-strip__item.is-active {
    border-color: var(--color-brand-yellow-dk);
    border-width: 3px;
    background: #FFF8E6; /* 2e cue (pas que la couleur de bordure) -- a11y 1.4.11 */
}

.category-strip__img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.category-strip__label {
    font-weight: var(--font-weight-bold);
}

.category-strip__arrow {
    flex: 0 0 auto;
    border: none;
    background: none;
    color: var(--color-brand-red);
    font-size: var(--font-size-xl);
    line-height: 1;
    padding: var(--space-2);
    cursor: pointer;
}

/* Focus clavier visible sur les controles L1 (panneau + bandeau). Outline jaune
   fonce decale pour rester percevable par-dessus la charte. */
.order-panel__pay:focus-visible,
.order-panel__abandon:focus-visible,
.order-panel__remove:focus-visible,
.category-strip__item:focus-visible,
.category-strip__arrow:focus-visible {
    outline: 3px solid var(--color-brand-yellow-dk);
    outline-offset: 2px;
}

/* === Modale d'options produit (L3 - quantite + ajout, au-dessus de la grille) === */
.product-options {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    text-align: center;
}

.product-options__image {
    width: 160px;
    height: 160px;
    object-fit: contain;
}

.product-options__unit {
    color: var(--color-text-secondary);
}

/* Picker de taille (R4 : 30/50 cl) : boutons-pills, l'actif borde par l'accent. */
.product-options__sizes {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    justify-content: center;
}

.size-btn {
    min-width: 72px;
    padding: var(--space-2) var(--space-3);
    border: 2px solid var(--color-border-default);
    border-radius: var(--radius-pill);
    background: var(--color-bg-card);
    color: var(--color-text-primary);
    font-size: var(--font-size-md);
    cursor: pointer;
}

.size-btn--selected {
    border-color: var(--color-border-active);
    font-weight: 700;
}

.product-options__total {
    font-size: var(--font-size-md);
}

.qty-control {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

/* === Modale chevalet (sur-place, L4) + erreur paiement === */
.chevalet__hint {
    color: var(--color-text-secondary);
    text-align: center;
    margin-bottom: var(--space-4);
}

.chevalet__input {
    display: block;
    width: 100%;
    max-width: 220px;
    margin: 0 auto;
    padding: var(--space-3);
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    text-align: center;
    letter-spacing: 0.2em;
    border: 2px solid var(--color-border-default);
    border-radius: var(--radius-md);
}

.chevalet__input:focus-visible {
    outline: 3px solid var(--color-brand-yellow-dk);
    outline-offset: 2px;
}

.chevalet__error {
    color: var(--color-brand-red);
    text-align: center;
    margin-top: var(--space-3);
}

.payment-error {
    color: var(--color-brand-red);
    font-weight: var(--font-weight-bold);
    text-align: center;
    margin: var(--space-4) 0;
}

/* ============================================================
   12. ACCESSIBILITY — dyslexia-friendly font + toggle (RGAA Cr 1.c.2)
   ============================================================ */

/* OpenDyslexic (OFL 1.1), self-hosted under assets/fonts (see LICENSE-OpenDyslexic.txt).
   font-display: swap keeps text visible while the face downloads. */
@font-face {
    font-family: "OpenDyslexic";
    src: url("../fonts/opendyslexic-latin-400-normal.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "OpenDyslexic";
    src: url("../fonts/opendyslexic-latin-700-normal.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* a11y.js sets .dys-font on <html>; the whole interface then inherits the
   dyslexia-friendly stack via --font-family-base. Higher specificity than :root,
   so it overrides the base token. */
html.dys-font {
    --font-family-base: "OpenDyslexic", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

/* Fixed accessibility control, present on every screen (injected by a11y.js). */
/* Coin bas-gauche : libre du bouton Retour (haut-gauche), du panier (haut-droite)
   et du panneau commande sticky (flanc droit). En portrait, le bas reste en zone
   de pouce, donc atteignable. */
.a11y-toggle {
    position: fixed;
    bottom: var(--space-3);
    left: var(--space-3);
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--color-bg-card);
    color: var(--color-text-primary);
    border: 2px solid var(--color-border-default);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-card);
    font-family: var(--font-family-base);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    cursor: pointer;
}

.a11y-toggle__icon {
    font-size: var(--font-size-md);
    line-height: 1;
}

/* Active state: not signalled by colour alone (RGAA 1.4.1) — aria-pressed exposes
   the state to assistive tech, and the label text stays visible. */
.a11y-toggle[aria-pressed="true"] {
    background: var(--color-brand-yellow);
    border-color: var(--color-brand-yellow-dk);
}

.a11y-toggle:focus-visible {
    outline: 3px solid var(--color-brand-yellow-dk);
    outline-offset: 2px;
}

/* ============================================================
   13. COMPATIBILITE NAVIGATEURS (Cr 1.b.3)
   ============================================================ */

/* 'gap' sur conteneurs flex : non reconnu par d'anciens navigateurs (ex. Safari
   anterieur a 14.1). La detection @supports applique un repli par marges sur les
   enfants directs si la propriete n'est pas supportee (alternative documentee). */
@supports not (gap: 1rem) {
    .welcome__choices > *,
    .composer-footer__row > * {
        margin: var(--space-2);
    }
}
