/* =========================
   DESIGN SOBRE
   Une couleur de marque (bleu nuit) + blanc + gris très clair.
   La couleur vient seulement des produits : mousses, bulles, repères de parfum.
   Polices : Bricolage Grotesque (titres) + DM Sans (texte)
========================= */
:root {
    --ink: #14213D;
    --ink-soft: #4B5775;
    --white: #FFFFFF;
    --soft: #F4F6FA;
    --line: #E2E7F0;

    /* Couleurs de parfum : uniquement pour les produits */
    --yellow: #FFD84D;
    --blue: #6CB8FF;
    --green: #5FD6A5;
    --pink: #FF9EC4;
    --pot: #B8A4FF;
    --brume: #FFB98A;

    --france-bleu: #2B4BA0;
    --france-rouge: #E0343A;
    --bordeaux: #7B1E2F;

    --font-title: 'Bricolage Grotesque', 'Arial Black', Arial, sans-serif;
    --font-body: 'DM Sans', 'Segoe UI', Arial, sans-serif;
}


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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--white);
    padding-bottom: 52px; /* évite que le footer fixe cache le contenu */
}

a {
    color: inherit;
}

h1,
h2,
h3 {
    font-family: var(--font-title);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

h2 {
    margin-bottom: 30px;
    font-size: clamp(30px, 4vw, 40px);
}

:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 3px;
}

/* =========================
   BANDEAU + HEADER
========================= */
.promo {
    display: flex;
    justify-content: center;
    gap: 14px 32px;
    flex-wrap: wrap;
    padding: 9px 16px;
    background: var(--ink);
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 6%;
    border-bottom: 1px solid var(--line);
}

.logo,
.foot-brand {
    font-family: var(--font-title);
    font-size: 28px;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.03em;
}

.logo span,
.foot-brand span {
    font-weight: 600;
}

header nav {
    display: flex;
    gap: 28px;
}

header nav a {
    font-weight: 500;
    text-decoration: none;
}

header nav a:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}

main {
    width: 92%;
    max-width: 1180px;
    margin: 0 auto;
}

/* =========================
   BOUTONS
========================= */
.btn,
button {
    display: inline-block;
    padding: 13px 28px;
    border: none;
    border-radius: 999px;
    background: var(--ink);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover,
button:hover {
    background: #243A6B;
    transform: translateY(-1px);
}

/* =========================
   PRIX ET ÉTIQUETTE
========================= */
.price {
    display: block;
    margin-top: auto;
    padding-top: 8px;
    font-family: var(--font-title);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.price s {
    font-size: 0.6em;
    color: var(--ink-soft);
    margin-right: 8px;
    font-weight: 600;
    text-decoration-thickness: 2px;
}

.tag {
    padding: 3px 12px;
    border-radius: 999px;
    background: var(--soft);
    border: 1px solid var(--line);
    font-size: 13px;
    font-weight: 700;
}

/* =========================
   HERO : COFFRET
========================= */
.hero {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    gap: 40px;
    padding: 50px 0 76px;
}

.hero .claim {
    display: inline-block;
    margin-bottom: 16px;
}

.hero h1 {
    margin-bottom: 20px;
    font-size: clamp(42px, 6.4vw, 72px);
}

.hero-text > p {
    max-width: 46ch;
    margin-bottom: 28px;
    color: var(--ink-soft);
    font-size: 19px;
}

.offer {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 16px;
    margin-bottom: 24px;
}

.offer strong {
    font-family: var(--font-title);
    font-size: 24px;
    font-weight: 700;
}

.offer span {
    color: var(--ink-soft);
    font-weight: 500;
}

.hero .offer .price {
    display: inline;
    margin: 0;
    padding: 0;
    font-size: 36px;
}

/* Les bulles sont le seul grand moment de couleur de la page */
.hero-art {
    position: relative;
    aspect-ratio: 1 / 1;
    width: 100%;
    max-width: 480px;
    margin-left: auto;
    overflow: hidden;
    border-radius: 50%;
    background: var(--soft);
}

.hero-art img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background-image: radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.85) 0 9%, rgba(255, 255, 255, 0) 10%);
    animation: float 7s ease-in-out infinite;
}

.bubble em {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    padding: 0 10%;
    font-family: var(--font-title);
    font-style: normal;
    font-size: clamp(15px, 2.2vw, 22px);
    font-weight: 700;
    text-align: center;
}

.b1 { width: 58%; height: 58%; left: 6%;  top: 8%;    background-color: var(--yellow); }
.b2 { width: 46%; height: 46%; right: 4%; top: 30%;   background-color: var(--blue);   animation-delay: -2s; }
.b3 { width: 40%; height: 40%; left: 24%; bottom: 4%; background-color: var(--green);  animation-delay: -4s; }

/* Petites bulles décoratives retirées pour garder le visuel net */
.b4,
.b5 {
    display: none;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}

/* =========================
   COMMENT ÇA MARCHE
========================= */
.steps {
    margin-bottom: 76px;
    padding: 44px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.steps ol {
    list-style: none;
    counter-reset: step;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.steps li {
    counter-increment: step;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.steps li::before {
    content: counter(step);
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 8px;
    border: 2px solid var(--ink);
    border-radius: 50%;
    font-family: var(--font-title);
    font-size: 19px;
    font-weight: 800;
}

.steps strong {
    font-family: var(--font-title);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.steps span {
    color: var(--ink-soft);
}

/* =========================
   PRODUITS
========================= */
.shop {
    padding-bottom: 76px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.card {
    --tint: var(--yellow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--white);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(20, 33, 61, 0.1);
}

.card.citron { --tint: var(--yellow); }
.card.linge  { --tint: var(--blue); }
.card.givre  { --tint: var(--green); }
.card.saison { --tint: var(--pink); }
.card.pot    { --tint: var(--pot); }
.card.brume  { --tint: var(--brume); }

/* Le visuel porte la couleur du parfum, en teinte adoucie */
.visual {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: color-mix(in srgb, var(--tint) 50%, white);
}

.visual img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.visual::before,
.visual::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
}

.visual::before { width: 46%; aspect-ratio: 1; left: -8%; bottom: -14%; }
.visual::after  { width: 22%; aspect-ratio: 1; right: 12%; top: 14%; }

.card .body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    gap: 6px;
    padding: 20px 22px 24px;
}

/* Petit point de couleur devant le nom du parfum */
.card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 23px;
}

.card h3::before {
    content: "";
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--tint);
}

.card p {
    color: var(--ink-soft);
    font-size: 15px;
}

.card .meta {
    color: var(--ink);
    font-weight: 700;
}

.card .price {
    margin-bottom: 8px;
}

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

.grid.two .visual {
    aspect-ratio: 16 / 9;
}

.recharges .grid.two {
    max-width: 820px;
}

.pick {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 6px 0;
    font-size: 14px;
    font-weight: 700;
}

.pick select {
    min-width: 200px;
    padding: 9px 14px;
    border: 1.5px solid var(--ink);
    border-radius: 999px;
    background: var(--white);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
}

/* =========================
   FABRICATION FRANÇAISE (version compacte)
========================= */
.made {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
    padding: 16px 22px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--soft);
}

.made h2 {
    margin-bottom: 4px;
    font-size: 20px;
}

.made p {
    max-width: 60ch;
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.5;
}

.flag {
    display: flex;
    flex-shrink: 0;
    width: 48px;
    height: 32px;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 0 0 1px var(--line);
}

.flag i {
    flex: 1;
}

.flag i:nth-child(1) { background: var(--france-bleu); }
.flag i:nth-child(2) { background: var(--white); }
.flag i:nth-child(3) { background: var(--france-rouge); }

/* =========================
   FOOTER (compact, fixé en bas de l'écran)
========================= */
footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 24px;
    padding: 8px 6%;
    background: var(--ink);
    color: var(--white);
    font-size: 13px;
}

footer .foot-brand {
    font-size: 18px;
}

footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
}

footer nav a {
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

footer nav a:hover {
    text-decoration: underline;
}

footer p {
    font-size: 12px;
    opacity: 0.75;
}

/* =========================
   TABLETTE ET MOBILE
========================= */
@media (max-width: 980px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 760px) {
    body {
        font-size: 16px;
        padding-bottom: 64px;
    }

    header {
        flex-direction: column;
        gap: 12px;
    }

    header nav {
        gap: 18px;
    }

    .hero {
        grid-template-columns: 1fr;
        padding-bottom: 50px;
    }

    .hero-art {
        margin: 0 auto;
        max-width: 340px;
    }

    .steps ol {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .made {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 18px;
    }

    footer {
        justify-content: center;
    }

    footer .foot-brand,
    footer p {
        display: none;
    }
}

@media (max-width: 600px) {
    .grid.two {
        grid-template-columns: 1fr;
    }
}

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

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .bubble {
        animation: none;
    }

    .btn,
    button,
    .card {
        transition: none;
    }
}

/* =========================
   PANIER : compteur, animations, page panier
========================= */
.cart-link { display: inline-flex; align-items: center; gap: 6px; }

.cart-count {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--bordeaux);
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
}

.cart-count[hidden] { display: none; }
.cart-count.bump { animation: bump 0.4s ease; }

@keyframes bump {
    40% { transform: scale(1.5); }
}

.fly {
    position: fixed;
    z-index: 100;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 0 2px var(--white);
}

#toast {
    position: fixed;
    right: 20px;
    bottom: 70px; /* au-dessus du footer fixe */
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 340px;
    padding: 14px 18px;
    border-radius: 16px;
    background: var(--ink);
    color: var(--white);
    font-size: 15px;
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

#toast.show { opacity: 1; transform: none; pointer-events: auto; }
#toast a { flex-shrink: 0; font-weight: 700; }

.cart-page { padding: 44px 0 80px; }
.cart-page h1 { margin-bottom: 28px; font-size: clamp(34px, 5vw, 52px); }

.cart-empty { display: none; padding: 40px 0; }
.cart-empty p { margin-bottom: 20px; color: var(--ink-soft); }

.line {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 8px 20px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

/* Miniature du produit dans le panier */
.thumb {
    width: 64px;
    height: 64px;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--soft);
}

.thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.line .name { font-family: var(--font-title); font-size: 20px; font-weight: 700; }
.line .sub { color: var(--ink-soft); font-size: 14px; }
.line .total { min-width: 74px; font-weight: 700; text-align: right; }

.qty { display: inline-flex; align-items: center; gap: 4px; }

.qty button,
.line .remove {
    padding: 0;
    border: 1.5px solid var(--ink);
    background: var(--white);
    color: var(--ink);
    font-weight: 700;
}

.qty button { width: 32px; height: 32px; border-radius: 50%; font-size: 18px; line-height: 1; }
.qty output { min-width: 28px; font-weight: 700; text-align: center; }

.line .remove {
    grid-column: 1 / -1;
    justify-self: start;
    padding: 0;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 500;
    text-decoration: underline;
}

.line button:hover { background: var(--soft); transform: none; }

form#checkout { margin-top: 36px; }
form#checkout h2 { margin-bottom: 18px; font-size: 28px; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fields .full { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 5px; font-size: 14px; font-weight: 700; }

.field input,
.field select {
    padding: 11px 14px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
}

.field input:focus,
.field select:focus { border-color: var(--ink); outline: none; }
.field input:user-invalid { border-color: var(--france-rouge); }

.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ink-soft); }
.check input { margin-top: 4px; accent-color: var(--ink); }

#order-status { display: none; margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: var(--white); border: 1.5px solid var(--ink); font-size: 15px; }
#order-status.show { display: block; }

@media (max-width: 520px) {
    .fields { grid-template-columns: 1fr; }
    .line { grid-template-columns: auto 1fr auto; }
    .line .total { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
    .cart-count.bump { animation: none; }
    #toast { transition: none; }
}

/* =========================
   PANIER EN 3 ÉTAPES + COMPTEUR − 1 +
========================= */
[hidden] { display: none !important; }

.stepper { margin-top: 4px; }

.flow { max-width: 780px; }

.step-box { padding: 30px 0; border-top: 1px solid var(--line); }

.step-title { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.step-title h2 { margin: 0; font-size: 28px; }

.step-num {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border: 2px solid var(--ink);
    border-radius: 50%;
    font-family: var(--font-title);
    font-size: 18px;
    font-weight: 800;
}

form#checkout { margin-top: 0; }

.totals { max-width: 360px; margin: 18px 0 0 auto; }
.totals > div { display: flex; justify-content: space-between; padding: 6px 0; }
.totals .grand { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 20px; font-weight: 800; }
.hint { margin-top: 8px; color: var(--ink-soft); font-size: 14px; text-align: right; }

.pay { display: grid; gap: 12px; }

.pay label {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1.5px solid var(--line);
    border-radius: 14px;
    cursor: pointer;
}

.pay label:has(input:checked) { border-color: var(--ink); background: var(--soft); }
.pay input { accent-color: var(--ink); }
.pay small { color: var(--ink-soft); }

.pay-total { display: flex; justify-content: space-between; margin: 24px 0 14px; font-size: 20px; font-weight: 700; }
.pay-total strong { font-size: 24px; font-weight: 800; }

#order-btn { width: 100%; }
#order-btn:disabled { opacity: 0.5; cursor: not-allowed; }