/* ============================================================
   Ocean Fraîcheur — Design System CSS
   Mobile-first, thème poissonnerie
   Sections : Variables, Reset, Typographie, Layout, Header,
   Boutons, Cartes, Grille Produits, Formulaires, Alertes,
   Stepper, Chips, Panier Flottant, Table Admin, Badges Statut,
   Layout Admin, Stats, Modal, Quantité, Utilitaires,
   Media Queries, Print
   ============================================================ */

/* ============================================================
   1. VARIABLES CSS
   ============================================================ */
:root {
    --noir: #141519;
    --vert: #6db12d;
    --vert-hover: #5a9625;
    --orange: #f59f20;
    --sable: #f5f0e8;
    --blanc: #ffffff;

    /* Couleurs texte */
    --texte: #141519;
    --texte-light: #6b7280;

    /* Couleurs d'état */
    --succes: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;

    /* Couleurs UI */
    --border: #e5e7eb;
    --bg-page: #f8f9fa;

    /* Rayons de bordure */
    --radius: 16px;
    --radius-sm: 8px;
    --radius-full: 50px;

    /* Ombres */
    --shadow: 0 4px 24px rgba(20, 21, 25, 0.12);
    --shadow-sm: 0 2px 8px rgba(20, 21, 25, 0.08);

    /* Transition globale */
    --transition: 0.2s ease;

    /* Safe areas iPhone */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ============================================================
   2. RESET
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Century Gothic', CenturyGothic, AppleGothic, -apple-system, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--texte);
    background-color: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--vert);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--orange);
}

/* ============================================================
   2b. HERO
   ============================================================ */
/* === Hero === */
.hero {
    background: var(--noir);
    color: var(--blanc);
    padding: 2.5rem 1rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--bg-page);
    border-radius: 24px 24px 0 0;
}

.hero__logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: contain;
    margin: 0 auto 1.25rem;
    border: 3px solid rgba(255,255,255,0.15);
}

.hero h1 {
    color: var(--blanc);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.hero h1 span {
    color: var(--vert);
}

.hero p {
    color: rgba(255,255,255,0.75);
    font-size: 0.95rem;
    max-width: 420px;
    margin: 0 auto;
    line-height: 1.5;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(109,177,45,0.15);
    color: var(--vert);
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 1rem;
}

/* ============================================================
   3. TYPOGRAPHIE
   ============================================================ */
h1,
h2,
h3,
h4 {
    font-family: 'Century Gothic', CenturyGothic, AppleGothic, -apple-system, sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--noir);
}

h1 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

h2 {
    font-size: 1.375rem;
    margin-bottom: 0.625rem;
}

h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--texte);
}

/* ============================================================
   4. LAYOUT
   ============================================================ */
.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    width: 100%;
}

.page-content {
    padding: 1.5rem 1rem calc(5rem + var(--safe-bottom));
    min-height: calc(100vh - 60px);
}

/* ============================================================
   5. HEADER STICKY
   ============================================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--noir);
    box-shadow: var(--shadow);
    height: calc(60px + var(--safe-top));
    padding-top: var(--safe-top);
    display: flex;
    align-items: center;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--blanc);
    font-family: 'Century Gothic', CenturyGothic, AppleGothic, -apple-system, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
}

.header__logo:hover {
    color: var(--orange);
}

.header__logo img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 50%;
}

.header__logo-text {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--blanc);
}

.header__logo-text span {
    color: var(--vert);
    font-size: 0.7rem;
    display: block;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
    margin-top: -2px;
}

/* Panier dans le header */
.header__cart {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--blanc);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: background var(--transition);
    text-decoration: none;
}

.header__cart:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--orange);
}

.header__cart svg {
    width: 22px;
    height: 22px;
}

/* Badge compteur panier */
.header__cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background-color: var(--orange);
    color: var(--blanc);
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ============================================================
   6. BOUTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 52px;
    padding: 0.75rem 1.5rem;
    font-family: 'Century Gothic', CenturyGothic, AppleGothic, -apple-system, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}

/* Variante principale */
.btn--primary {
    background-color: var(--noir);
    color: var(--blanc);
    border-color: var(--noir);
}

.btn--primary:hover {
    background-color: var(--vert);
    border-color: var(--vert);
    color: var(--blanc);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* Variante secondaire */
.btn--secondary {
    background-color: var(--orange);
    color: var(--noir);
    border-color: var(--orange);
}

.btn--secondary:hover {
    background-color: #e08e1a;
    border-color: #e08e1a;
    color: var(--noir);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* Variante danger */
.btn--danger {
    background-color: var(--danger);
    color: var(--blanc);
    border-color: var(--danger);
}

.btn--danger:hover {
    background-color: #dc2626;
    border-color: #dc2626;
    color: var(--blanc);
    transform: translateY(-1px);
}

/* Variante succès */
.btn--success {
    background-color: var(--succes);
    color: var(--blanc);
    border-color: var(--succes);
}

.btn--success:hover {
    background-color: #16a34a;
    border-color: #16a34a;
    color: var(--blanc);
    transform: translateY(-1px);
}

/* Variante outline */
.btn--outline {
    background-color: transparent;
    color: var(--noir);
    border-color: var(--noir);
}

.btn--outline:hover {
    background-color: var(--noir);
    color: var(--blanc);
    transform: translateY(-1px);
}

/* Taille petite */
.btn--small {
    min-height: 36px;
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
}

/* Variante ajout au panier */
.btn--add {
    background: var(--vert);
    color: var(--blanc);
    border-color: var(--vert);
    border-radius: var(--radius-sm);
    min-height: 44px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    gap: 0.25rem;
}

.btn--add:hover {
    background: var(--vert-hover);
    border-color: var(--vert-hover);
}

.btn--add svg {
    width: 18px;
    height: 18px;
}

/* Pleine largeur */
.btn--full {
    width: 100%;
}

/* Désactivé */
.btn:disabled,
.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
    box-shadow: none;
}

/* ============================================================
   7. CARTES PRODUITS
   ============================================================ */
.card {
    background-color: var(--blanc);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

/* Image de la carte */
.card__image {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background-color: var(--sable);
    /* L'image (qui porte directement cette classe) remplit la boîte sans déformation */
    object-fit: cover;
}

.card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.card:hover .card__image img {
    transform: scale(1.04);
}

/* Corps de la carte */
.card__body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Titre */
.card__title {
    font-family: 'Century Gothic', CenturyGothic, AppleGothic, -apple-system, sans-serif;
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--noir);
    margin: 0;
    line-height: 1.3;
}

/* Description */
.card__description {
    font-size: 0.875rem;
    color: var(--texte-light);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Détail du contenu du plateau */
.card__contenu {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0.5rem 0 0;
    border-top: 1px solid var(--gris-clair, #e5e7eb);
    font-size: 0.8125rem;
    color: var(--texte-light);
    line-height: 1.5;
}

.card__contenu li {
    padding-left: 0.85rem;
    position: relative;
}

.card__contenu li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--vert, #2e7d32);
}

/* Menu d'accès rapide aux catégories (barre collante, défilement horizontal) */
.cat-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    border-bottom: 1px solid var(--border, #e5e7eb);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.cat-nav::-webkit-scrollbar {
    display: none;
}

.cat-nav__list {
    display: flex;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    min-width: max-content;
}

.cat-nav__link {
    white-space: nowrap;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: var(--sable, #f0f4f8);
    color: var(--noir, #141519);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
}

.cat-nav__link:hover,
.cat-nav__link:active {
    background: var(--vert, #2e7d32);
    color: #fff;
}

/* Décalage d'ancrage pour ne pas masquer le titre sous la barre collante */
[id^="sec-"] {
    scroll-margin-top: 64px;
}

html {
    scroll-behavior: smooth;
}

/* Bannière d'installation PWA (écran d'accueil) */
#pwa-install-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--noir, #141519);
    color: #fff;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    transform: translateY(150%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    max-width: 520px;
    margin: 0 auto;
}

#pwa-install-banner.pwa-install--visible {
    transform: translateY(0);
    opacity: 1;
}

.pwa-install__text {
    flex: 1;
    font-size: 0.85rem;
    line-height: 1.4;
}

.pwa-install__icon {
    display: inline-block;
    padding: 0 0.2rem;
}

.pwa-install__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.pwa-install__close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.4rem;
}

.pwa-install__close:hover {
    color: #fff;
}

/* Choix de préparation des huîtres */
.card__huitres {
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--gris-clair, #e5e7eb);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.85rem;
    font-size: 0.8125rem;
}

.card__huitres-label {
    font-weight: 600;
    color: var(--texte, #141519);
}

.card__huitres label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    color: var(--texte-light);
}

.card__huitres input {
    accent-color: var(--vert, #2e7d32);
}

/* Prix */
.card__price {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--noir);
    margin: 0;
}

.card__price span {
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--texte-light);
}

/* Badge sur la carte */
.card__badge {
    position: absolute;
    top: 0.625rem;
    left: 0.625rem;
    padding: 0.25rem 0.625rem;
    background-color: var(--orange);
    color: var(--noir);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    line-height: 1.4;
}

/* Badge rupture de stock */
.card__badge--rupture {
    background-color: var(--danger);
    color: var(--blanc);
}

/* Pied de carte : prix + bouton */
.card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
    background: var(--bg-page);
}

/* ============================================================
   8. GRILLE PRODUITS
   ============================================================ */
.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* ============================================================
   9. FORMULAIRES
   ============================================================ */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-bottom: 1.25rem;
}

.form-group label {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--noir);
}

/* Champs texte, email, number, etc. */
.form-control {
    width: 100%;
    min-height: 52px;
    padding: 0.75rem 1rem;
    font-family: 'Century Gothic', CenturyGothic, AppleGothic, -apple-system, sans-serif;
    font-size: 1rem;
    color: var(--texte);
    background-color: var(--blanc);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
    appearance: none;
    -webkit-appearance: none;
    outline: none;
}

.form-control:focus {
    border-color: var(--vert);
    box-shadow: 0 0 0 3px rgba(109, 177, 45, 0.15);
}

.form-control::placeholder {
    color: var(--texte-light);
    opacity: 1;
}

.form-control:disabled {
    background-color: var(--bg-page);
    opacity: 0.7;
    cursor: not-allowed;
}

/* Select avec flèche personnalisée */
select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.875rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

/* Textarea */
textarea.form-control {
    min-height: 120px;
    resize: vertical;
    padding-top: 0.75rem;
    line-height: 1.6;
}

/* ============================================================
   10. ALERTES
   ============================================================ */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* Succès — vert */
.alert-success, .alert--success {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

/* Erreur — rouge */
.alert-error, .alert--error {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* Avertissement — ambre */
.alert-warning, .alert--warning {
    background-color: #fffbeb;
    border-color: #fed7aa;
    color: #92400e;
}

/* Info — bleu */
.alert-info, .alert--info {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

/* ============================================================
   11. STEPPER (indicateur d'étapes)
   ============================================================ */
.stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 1rem 0;
}

.stepper__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    position: relative;
    flex: 1;
}

/* Cercle de l'étape */
.stepper__circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    background-color: var(--blanc);
    border: 2px solid var(--border);
    color: var(--texte-light);
    z-index: 1;
    transition: all var(--transition);
    position: relative;
}

/* Étape active */
.stepper__step--active .stepper__circle {
    background-color: var(--vert);
    border-color: var(--vert);
    color: var(--blanc);
}

/* Étape terminée */
.stepper__step--done .stepper__circle {
    background-color: var(--succes);
    border-color: var(--succes);
    color: var(--blanc);
}

/* Label de l'étape — masqué sur mobile */
.stepper__label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--texte-light);
    text-align: center;
    display: none;
}

.stepper__step--active .stepper__label {
    color: var(--noir);
}

.stepper__step--done .stepper__label {
    color: var(--succes);
}

/* Ligne entre les étapes */
.stepper__line {
    flex: 1;
    height: 2px;
    background-color: var(--border);
    margin-top: -18px;
    align-self: flex-start;
    margin-bottom: auto;
    position: relative;
    z-index: 0;
}

.stepper__line--done {
    background-color: var(--succes);
}

/* ============================================================
   12. CHIPS (sélecteurs de filtre/option)
   ============================================================ */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.875rem;
    font-family: 'Century Gothic', CenturyGothic, AppleGothic, -apple-system, sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    background-color: var(--blanc);
    color: var(--texte);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    user-select: none;
}

.chip:hover {
    border-color: var(--vert);
    color: var(--vert);
}

/* Chip sélectionné */
.chip--selected {
    background-color: var(--sable);
    border-color: var(--noir);
    color: var(--noir);
}

/* Chip désactivé */
.chip--disabled {
    background-color: var(--bg-page);
    border-color: var(--border);
    color: var(--texte-light);
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.6;
}

/* Conteneur de chips */
.chips-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.5rem 0;
}

/* ============================================================
   13. PANIER FLOTTANT
   ============================================================ */
.floating-cart {
    position: fixed;
    bottom: calc(1.25rem + var(--safe-bottom));
    left: 1rem;
    right: 1rem;
    z-index: 50;
    background-color: var(--noir);
    color: var(--blanc);
    border-radius: var(--radius-full);
    box-shadow: 0 4px 24px rgba(20, 21, 25, 0.3);
    padding: 0.875rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: pointer;
    transform: translateY(120%);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
}

/* Visible */
.floating-cart--visible {
    transform: translateY(0);
}

.floating-cart__info {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex: 1;
    min-width: 0;
}

.floating-cart__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    flex-shrink: 0;
}

.floating-cart__icon svg {
    width: 18px;
    height: 18px;
}

.floating-cart__count {
    font-size: 0.9375rem;
    font-weight: 700;
    white-space: nowrap;
}

.floating-cart__total {
    font-size: 1.0625rem;
    font-weight: 800;
    color: var(--orange);
    white-space: nowrap;
    margin-left: auto;
}

/* ============================================================
   14. TABLE ADMIN
   ============================================================ */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--blanc);
    font-size: 0.9375rem;
}

.table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--texte-light);
    background-color: var(--bg-page);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--texte);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background-color: #f5f0e8;
}

/* ============================================================
   15. BADGES STATUT COMMANDES
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.8125rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    white-space: nowrap;
    line-height: 1.4;
}

/* En attente — ambre */
.badge--en_attente {
    background-color: #fef3c7;
    color: #92400e;
}

/* Payée — bleu */
.badge--payee {
    background-color: #dbeafe;
    color: #1e40af;
}

/* Préparée — indigo */
.badge--preparee {
    background-color: #e0e7ff;
    color: #3730a3;
}

/* Livrée — vert */
.badge--livree {
    background-color: #dcfce7;
    color: #166534;
}

/* Annulée — rouge */
.badge--annulee {
    background-color: #fee2e2;
    color: #991b1b;
}

/* ============================================================
   16. LAYOUT ADMIN
   ============================================================ */

/* Bouton hamburger (caché sur desktop, visible sur mobile) */
.admin-nav-toggle {
    display: none;
    background: rgba(255,255,255,0.1);
    border: none;
    color: var(--blanc);
    width: 42px;
    height: 42px;
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 0.5rem;
}

.admin-nav-toggle:hover {
    background: rgba(255,255,255,0.2);
}

/* Drawer latéral — caché par défaut, visible uniquement sur mobile */
.admin-drawer {
    display: none;
}

/* Affichage sur mobile uniquement */
@media (max-width: 900px) {
    .admin-drawer {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        max-width: 85vw;
        background: var(--blanc);
        z-index: 300;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 4px 0 24px rgba(0,0,0,0.2);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-drawer--open {
        transform: translateX(0);
    }
}

.admin-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--noir);
    color: var(--blanc);
    font-size: 1.1rem;
}

.admin-drawer__close {
    background: none;
    border: none;
    color: var(--blanc);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
}

.admin-drawer__list {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    flex: 1;
}

.admin-drawer__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: var(--texte);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-left: 3px solid transparent;
    transition: all var(--transition);
}

.admin-drawer__link:hover {
    background: var(--bg-page);
    color: var(--vert);
    text-decoration: none;
}

.admin-drawer__link--active {
    background: var(--sable);
    color: var(--noir);
    border-left-color: var(--vert);
}

.admin-drawer__icon {
    font-size: 1.25rem;
    width: 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

.admin-drawer-backdrop {
    display: none;
}

@media (max-width: 900px) {
    .admin-drawer-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 250;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        backdrop-filter: blur(2px);
    }

    .admin-drawer-backdrop--open {
        opacity: 1;
        visibility: visible;
    }
}

.admin-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--noir);
    color: var(--blanc);
    padding: 0.875rem 1rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.admin-header__title {
    font-family: 'Century Gothic', CenturyGothic, AppleGothic, -apple-system, sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--blanc);
    white-space: nowrap;
}

/* Navigation admin — scroll horizontal sur mobile */
.admin-nav {
    background-color: var(--blanc);
    border-bottom: 2px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    scrollbar-width: none;
}

.admin-nav::-webkit-scrollbar {
    display: none;
}

.admin-nav__list {
    display: flex;
    list-style: none;
    gap: 0;
    min-width: max-content;
    padding: 0 0.5rem;
}

.admin-nav__link {
    display: block;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--texte-light);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
    text-decoration: none;
}

.admin-nav__link:hover {
    color: var(--vert);
    border-bottom-color: var(--vert);
}

/* Lien actif */
.admin-nav__link--active {
    background-color: var(--sable);
    color: var(--noir);
    border-bottom-color: var(--noir);
    font-weight: 700;
}

/* ============================================================
   17. STATS CARDS
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background-color: var(--blanc);
    border-radius: var(--radius);
    padding: 1.25rem 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-card__value {
    font-family: 'Century Gothic', CenturyGothic, AppleGothic, -apple-system, sans-serif;
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--noir);
    line-height: 1;
}

.stat-card__label {
    font-size: 0.8125rem;
    color: var(--texte-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ============================================================
   18. MODAL BOTTOM-SHEET
   ============================================================ */
/* Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(20, 21, 25, 0.5);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
    backdrop-filter: blur(2px);
}

.modal-overlay--active {
    opacity: 1;
    visibility: visible;
}

/* Animation slide-up */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal */
.modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 201;
    background-color: var(--blanc);
    border-radius: var(--radius) var(--radius) 0 0;
    max-height: 92vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding-bottom: env(safe-area-inset-bottom, 1rem);
}

.modal-overlay--active .modal {
    transform: translateY(0);
    animation: slideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* En-tête de la modal */
.modal__header {
    position: sticky;
    top: 0;
    background-color: var(--blanc);
    padding: 1.25rem 1rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    z-index: 1;
}

.modal__header h3 {
    margin: 0;
    font-size: 1.125rem;
}

/* Indicateur de drag (poignée) */
.modal__header::before {
    content: '';
    position: absolute;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background-color: var(--border);
    border-radius: var(--radius-full);
}

.modal__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg-page);
    color: var(--texte-light);
    cursor: pointer;
    transition: all var(--transition);
    flex-shrink: 0;
}

.modal__close:hover {
    background-color: var(--border);
    color: var(--texte);
}

.modal__body {
    padding: 1rem;
}

/* ============================================================
   19. CONTRÔLE DE QUANTITÉ
   ============================================================ */
.qty-control {
    display: inline-flex;
    align-items: center;
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
    background-color: var(--blanc);
}

.qty-control__btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--noir);
    transition: background var(--transition);
    flex-shrink: 0;
    line-height: 1;
}

.qty-control__btn:hover {
    background-color: var(--sable);
}

.qty-control__btn:disabled {
    color: var(--texte-light);
    cursor: not-allowed;
}

.qty-control__value {
    width: 48px;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--noir);
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    background: none;
    outline: none;
    padding: 0;
    line-height: 40px;
}

/* ============================================================
   20. UTILITAIRES
   ============================================================ */

/* Alignement texte */
.text-center { text-align: center; }
.text-right  { text-align: right; }

/* Couleurs de texte */
.text-muted   { color: var(--texte-light); }
.text-success { color: var(--succes); }
.text-danger  { color: var(--danger); }

/* Marges */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Flex */
.flex         { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* Gaps */
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* Masqué */
.hidden { display: none !important; }

/* ============================================================
   20b. SECTION TITLE & CARD ANIMATION
   ============================================================ */
.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.section-title h2 {
    margin: 0;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: var(--border);
    border-radius: 1px;
}

@keyframes addPulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.97); }
    100% { transform: scale(1); }
}

.card--added {
    animation: addPulse 0.3s ease;
}

/* ============================================================
   20c. RESPONSIVE TABLES — Mode cartes sur mobile
   ============================================================ */
/* Sur mobile, les tableaux se transforment en cartes empilées */
@media (max-width: 767px) {
    .table-wrapper {
        border: none;
        overflow: visible;
    }

    .table,
    .table thead,
    .table tbody,
    .table tr,
    .table td,
    .table th {
        display: block;
    }

    .table thead {
        display: none;
    }

    .table tbody tr {
        background: var(--blanc);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 0.75rem;
        margin-bottom: 0.75rem;
        box-shadow: var(--shadow-sm);
    }

    .table tbody tr:hover {
        background: var(--blanc);
    }

    .table tbody td {
        padding: 0.5rem 0;
        border: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
        text-align: right;
        word-break: break-word;
    }

    .table tbody td:before {
        content: attr(data-label);
        font-weight: 700;
        text-transform: uppercase;
        font-size: 0.7rem;
        color: var(--texte-light);
        letter-spacing: 0.05em;
        flex-shrink: 0;
        text-align: left;
    }

    .table tbody td:not([data-label]):before {
        display: none;
    }

    /* Les cellules avec juste des boutons prennent toute la largeur */
    .table tbody td[data-label=""] {
        justify-content: flex-start;
    }

    /* Formulaires inline dans les tableaux : pleine largeur */
    .table tbody td form {
        flex: 1;
        max-width: 200px;
    }

    .table tbody td .form-control {
        min-height: 40px;
        font-size: 0.85rem;
    }
}

/* ============================================================
   20d. LAYOUT ADMIN MOBILE-FIRST
   ============================================================ */
/* Boutons plus gros au touch */
.btn--touch {
    min-height: 48px;
}

/* Scroll fluide pour le contenu admin */
.admin-main {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
}

/* Admin header responsive */
@media (max-width: 900px) {
    .admin-header {
        padding: 0.625rem 0.75rem;
    }

    .admin-header__logo {
        font-size: 0.9rem;
        gap: 0.5rem;
    }

    .admin-header__logo img {
        width: 32px !important;
        height: 32px !important;
    }

    .admin-header__label {
        display: none;
    }

    .admin-header__nom {
        display: none;
    }

    .admin-header__user .btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
        min-height: 36px;
    }

    /* Masquer la nav horizontale sur mobile, afficher le hamburger */
    .admin-nav {
        display: none;
    }

    .admin-nav-toggle {
        display: flex;
    }

    /* Masquer le nom admin pour gagner de la place */
    .admin-header__nom {
        display: none;
    }

    /* Pages admin : titres plus petits */
    h1 {
        font-size: 1.375rem;
    }

    /* Cards admin padding réduit */
    .admin-main {
        padding: 0.75rem;
    }

    .card__body {
        padding: 1rem 0.875rem;
    }

    /* Forms admin : plein écran sur mobile */
    .form-group {
        margin-bottom: 1rem;
    }

    /* Filter forms : stack sur mobile */
    .card form.flex {
        flex-direction: column;
        align-items: stretch;
    }

    .card form.flex .form-group {
        width: 100%;
        min-width: 0 !important;
    }

    .card form.flex .btn {
        width: 100%;
    }

    /* Flex between → stack */
    .flex-between {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* ============================================================
   21. MEDIA QUERIES
   ============================================================ */

/* -- 480px : petit mobile large ----------------------------- */
@media (min-width: 480px) {
    /* Grille 2 colonnes */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Labels du stepper visibles */
    .stepper__label {
        display: block;
    }
}

/* -- 768px : tablette --------------------------------------- */
@media (min-width: 768px) {
    /* Titres plus grands */
    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    /* Grille 3 colonnes */
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Stats 4 colonnes */
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Panier flottant aligné à droite */
    .floating-cart {
        left: auto;
        right: 2rem;
        max-width: 360px;
        bottom: 2rem;
    }

    /* Modal centrée (dialog) */
    .modal {
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        transform: translate(-50%, -50%);
        border-radius: var(--radius);
        max-width: 560px;
        width: 100%;
        max-height: 85vh;
        animation: none;
    }

    .modal-overlay--active .modal {
        animation: none;
        transform: translate(-50%, -50%);
    }

    /* Navigation admin centrée, sur plusieurs lignes si nécessaire (tablette) */
    .admin-nav {
        justify-content: center;
    }

    .admin-nav__list {
        min-width: unset;
        padding: 0 1rem;
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 0.25rem;
    }

    /* Padding page-content */
    .page-content {
        padding: 2rem 1.5rem 4rem;
    }
}

/* -- 1024px : desktop --------------------------------------- */
@media (min-width: 1024px) {
    /* Grille 4 colonnes */
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .page-content {
        padding: 2.5rem 2rem 4rem;
    }
}

/* ============================================================
   22. STYLES IMPRESSION
   ============================================================ */
@media print {
    /* Masquer les éléments non pertinents */
    .header,
    .admin-header,
    .admin-nav,
    .floating-cart,
    .btn,
    .qty-control,
    .modal-overlay {
        display: none !important;
    }

    body {
        background-color: #ffffff;
        color: #000000;
        font-size: 12pt;
    }

    .table {
        font-size: 10pt;
    }

    .table th,
    .table td {
        padding: 0.4rem 0.5rem;
    }

    /* Éviter les coupures de page dans les tableaux */
    .table tr {
        page-break-inside: avoid;
    }

    h1, h2, h3 {
        color: #000000;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    a {
        color: #000000;
        text-decoration: underline;
    }
}
