/* ========================================
   RESET & BASE
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--c-text);
    background-color: var(--c-surface);
}

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

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

/* ========================================
   DESIGN TOKENS — OKLCH
   (repris du site sport-sante-sarreguemines.fr pour rester dans la même famille visuelle)
======================================== */
:root {
    /* Brand teal */
    --c-brand:        oklch(60% 0.17 194);
    --c-brand-deep:   oklch(44% 0.16 194);
    --c-brand-mid:    oklch(73% 0.12 194);
    --c-brand-subtle: oklch(94.5% 0.04 194);

    /* Surfaces — warm-tinted, not cold gray */
    --c-surface:      oklch(98.5% 0.005 80);
    --c-surface-alt:  oklch(96% 0.011 75);
    --c-raised:       oklch(99.5% 0.003 80);

    /* Text — warm dark */
    --c-text:         oklch(17% 0.025 65);
    --c-text-soft:    oklch(46% 0.03 70);
    --c-text-faint:   oklch(65% 0.02 75);

    /* Borders */
    --c-border:       oklch(89% 0.012 80);
    --c-border-brand: oklch(83% 0.09 194);

    /* Shadows */
    --sh-sm:    0 2px 8px oklch(17% 0.025 65 / 0.07);
    --sh-md:    0 6px 24px oklch(17% 0.025 65 / 0.10);
    --sh-lg:    0 12px 40px oklch(17% 0.025 65 / 0.12);
    --sh-brand: 0 6px 24px oklch(60% 0.17 194 / 0.22);

    /* Dark footer */
    --c-footer: oklch(12% 0.02 194);

    /* Brand gradient */
    --grad-brand: linear-gradient(135deg, var(--c-brand-deep), var(--c-brand));

    /* États (spécifiques boutique) */
    --c-succes:        oklch(52% 0.14 150);
    --c-succes-fond:   oklch(94% 0.045 150);
    --c-erreur:        oklch(52% 0.18 25);
    --c-erreur-fond:   oklch(94% 0.05 25);
}

/* ========================================
   LAYOUT
======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

main.container {
    padding-top: 3rem;
    padding-bottom: 5rem;
}

/* ========================================
   HEADER STICKY
======================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: oklch(98.5% 0.005 80 / 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--c-border);
}

.site-header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.site-header__logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.site-header__logo-img {
    height: 40px;
    width: auto;
    display: block;
}

.site-header__logo-sous {
    font-size: 13px;
    font-weight: 500;
    color: var(--c-text-soft);
    padding-left: 0.6rem;
    border-left: 1px solid var(--c-border);
}

.site-header__nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-header__nav a {
    color: var(--c-text);
    font-weight: 500;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 6px;
    transition: all 0.22s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.site-header__nav a:hover {
    color: var(--c-brand);
    background: oklch(60% 0.17 194 / 0.06);
}

.panier-lien {
    position: relative;
}

.panier-lien__badge {
    background: var(--grad-brand);
    color: var(--c-raised);
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 1.2rem;
    height: 1.2rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.35rem;
    box-shadow: var(--sh-brand);
}

/* ========================================
   TYPOGRAPHIE
======================================== */
h1, h2, h3 {
    font-weight: 700;
    color: var(--c-text);
    letter-spacing: -0.3px;
}

h1 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.page-entete {
    margin-bottom: 2.5rem;
}

.page-entete p {
    color: var(--c-text-soft);
    margin: 0;
}

/* ========================================
   MESSAGES FLASH
======================================== */
.messages {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.message {
    padding: 0.85rem 1.1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
}

.message--error {
    background: var(--c-erreur-fond);
    color: var(--c-erreur);
}

.message--succes {
    background: var(--c-succes-fond);
    color: var(--c-succes);
}

/* ========================================
   GRILLE PRODUITS
======================================== */
.grille-produits {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.75rem;
    margin-top: 1.5rem;
}

.carte-produit {
    display: flex;
    flex-direction: column;
    background: var(--c-raised);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--sh-sm);
    transition: box-shadow 0.28s ease, transform 0.28s ease;
}

.carte-produit:hover {
    box-shadow: var(--sh-brand);
    transform: translateY(-4px);
}

.carte-produit__lien {
    display: block;
    text-decoration: none;
    color: inherit;
}

.carte-produit__image-conteneur {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--c-brand-subtle);
}

.carte-produit__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.carte-produit:hover .carte-produit__image {
    transform: scale(1.05);
}

.carte-produit__corps {
    padding: 1.1rem 1.2rem 0.9rem;
}

.carte-produit__nom {
    font-size: 1.02rem;
    margin: 0 0 0.3rem;
}

.carte-produit__prix {
    font-weight: 700;
    color: var(--c-brand-deep);
    margin: 0;
}

.prix-barre {
    text-decoration: line-through;
    color: var(--c-text-faint);
    font-weight: 500;
    margin-right: 0.5rem;
    font-size: 0.9em;
}

.prix-barre--grand {
    font-size: 1.15rem;
}

.carte-produit__action {
    padding: 0 1.2rem 1.2rem;
    margin-top: auto;
}

.etat-vide {
    color: var(--c-text-soft);
    padding: 3rem 0;
    text-align: center;
}

/* ========================================
   FICHE PRODUIT
======================================== */
.lien-retour {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1.75rem;
    color: var(--c-text-soft);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.lien-retour:hover {
    color: var(--c-brand);
}

.fiche-produit {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 3rem;
}

.fiche-produit__image-conteneur {
    border-radius: 20px;
    overflow: hidden;
    background: var(--c-brand-subtle);
    box-shadow: var(--sh-md);
    aspect-ratio: 4 / 5;
}

.fiche-produit__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fiche-produit__nom {
    font-size: clamp(26px, 3.5vw, 34px);
}

.fiche-produit__description {
    color: var(--c-text-soft);
    margin: 0.5rem 0 1.25rem;
}

.fiche-produit__prix {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--c-brand-deep);
    margin-bottom: 1.75rem;
}

.champ-groupe {
    margin-bottom: 1.5rem;
}

.champ-groupe label,
.champ-libelle {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--c-text-soft);
    margin-bottom: 0.6rem;
}

.pills-taille {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.pills-taille input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    border: 1.5px solid var(--c-border);
    background: var(--c-raised);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pills-taille input:checked + .pill {
    background: var(--grad-brand);
    border-color: transparent;
    color: var(--c-raised);
    box-shadow: var(--sh-brand);
}

.pills-taille input:disabled + .pill {
    color: var(--c-text-faint);
    border-color: var(--c-border);
    background: var(--c-surface-alt);
    cursor: not-allowed;
    text-decoration: line-through;
}

.champ-quantite {
    width: 5rem;
    padding: 0.6rem 0.75rem;
    border: 1.5px solid var(--c-border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--c-raised);
    color: var(--c-text);
}

/* ========================================
   BOUTONS
======================================== */
.bouton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.2px;
    cursor: pointer;
    padding: 0.9rem 1.9rem;
    transition: all 0.28s ease;
}

.bouton--principal {
    background: var(--grad-brand);
    color: var(--c-raised);
    box-shadow: var(--sh-brand);
}

.bouton--principal:hover {
    background: linear-gradient(135deg, var(--c-brand), var(--c-brand-mid));
    transform: translateY(-2px);
    box-shadow: 0 10px 28px oklch(60% 0.17 194 / 0.34);
}

.bouton--principal:active {
    transform: translateY(0) scale(0.98);
}

.bouton--pleine-largeur {
    width: 100%;
}

.bouton--discret {
    background: transparent;
    color: var(--c-text-soft);
    padding: 0.5rem 0.75rem;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 8px;
}

.bouton--discret:hover {
    color: var(--c-erreur);
    background: var(--c-erreur-fond);
}

.bouton--petit {
    padding: 0.6rem 1.1rem;
    font-size: 0.85rem;
}

.bouton[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

.bouton[disabled]:hover {
    transform: none;
    box-shadow: none;
    background: transparent;
    color: var(--c-text-soft);
}

/* ========================================
   FORMULAIRES
======================================== */
.formulaire input[type="text"],
.formulaire input[type="email"] {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1.5px solid var(--c-border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--c-raised);
    color: var(--c-text);
}

.formulaire input[type="text"]:focus,
.formulaire input[type="email"]:focus,
.champ-quantite:focus {
    outline: none;
    border-color: var(--c-brand);
    box-shadow: 0 0 0 3px oklch(60% 0.17 194 / 0.15);
}

/* ========================================
   PANIER
======================================== */
.page-panier {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.lignes-panier {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ligne-panier {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 1rem;
    align-items: center;
    background: var(--c-raised);
    border-radius: 16px;
    box-shadow: var(--sh-sm);
    padding: 0.9rem 1.1rem;
}

.ligne-panier__image {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--c-brand-subtle);
}

.ligne-panier__nom {
    font-weight: 700;
    margin: 0 0 0.15rem;
}

.ligne-panier__taille {
    color: var(--c-text-soft);
    font-size: 0.85rem;
    margin: 0 0 0.5rem;
}

.ligne-panier__maj {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.ligne-panier__maj input {
    width: 4rem;
    padding: 0.4rem 0.5rem;
    border: 1.5px solid var(--c-border);
    border-radius: 8px;
    font-family: inherit;
    background: var(--c-raised);
    color: var(--c-text);
}

.ligne-panier__droite {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.6rem;
}

.ligne-panier__sous-total {
    font-weight: 700;
    color: var(--c-brand-deep);
}

.recap-panier {
    background: var(--c-raised);
    border-radius: 20px;
    box-shadow: var(--sh-md);
    padding: 1.5rem;
    position: sticky;
    top: 6rem;
}

.recap-panier__total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-weight: 700;
    font-size: 1.2rem;
    padding: 1rem 0;
    border-top: 1px solid var(--c-border);
    border-bottom: 1px solid var(--c-border);
    margin-bottom: 1.25rem;
}

.recap-panier__total span:last-child {
    color: var(--c-brand-deep);
}

/* ========================================
   CONFIRMATION
======================================== */
.confirmation {
    background: var(--c-raised);
    border-radius: 24px;
    box-shadow: var(--sh-md);
    padding: 2.5rem;
    max-width: 560px;
    margin: 0 auto;
}

.confirmation__badge {
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
}

.confirmation--payee .confirmation__badge {
    background: var(--c-succes-fond);
    color: var(--c-succes);
}

.confirmation--echouee .confirmation__badge {
    background: var(--c-erreur-fond);
    color: var(--c-erreur);
}

.confirmation--en_attente .confirmation__badge {
    background: var(--c-brand-subtle);
    color: var(--c-brand-deep);
}

.confirmation--echouee h1 {
    color: var(--c-erreur);
}

.details-commande {
    margin: 1.75rem 0;
    border-top: 1px solid var(--c-border);
    padding-top: 1.25rem;
}

.details-commande__ligne {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    font-size: 0.95rem;
}

.details-commande__ligne--total {
    font-weight: 700;
    border-top: 1px solid var(--c-border);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
}

/* ========================================
   FOOTER
======================================== */
.site-footer {
    background: var(--c-footer);
    color: var(--c-raised);
    padding: 2.75rem 1.5rem 2.25rem;
    border-top: 3px solid var(--c-brand);
    text-align: center;
}

.site-footer p {
    font-size: 14px;
    opacity: 0.7;
    margin: 0;
}

@media (max-width: 720px) {
    .fiche-produit {
        grid-template-columns: 1fr;
    }

    .page-panier {
        grid-template-columns: 1fr;
    }

    .recap-panier {
        position: static;
    }

    .ligne-panier {
        grid-template-columns: 56px 1fr;
    }

    .ligne-panier__droite {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .site-header__logo-sous {
        display: none;
    }
}
