/* ==========================================================================
   Mimi Moon — feuille de style de la boutique
   Direction : "jardin de nuit" — croissant de lune, rose vieilli, or bruni,
   contraste entre l'ivoire du jour et l'encre-nuit du soir.
   Typo : Fraunces (display) + Jost (texte courant).
   ========================================================================== */

:root {
    --ivoire: #fbf7f1;
    --creme: #f6efe7;
    --rose-pale: #ecd9d3;
    --rose: #c98f86;
    --rose-fonce: #a96f68;
    --or: #b6903f;
    --or-pale: #e8d6ae;
    --nuit: #29222f;
    --nuit-texte: #f3ece6;
    --encre: #372b28;
    --encre-douce: #8d7a72;
    --trait: #e6d9cf;
    --blanc: #fff;
    --sauge: #7c8a72;
    --rayon: 3px;
    --ombre: 0 22px 44px -30px rgba(41, 34, 47, .55);
    --serif: "Fraunces", "Iowan Old Style", "Times New Roman", serif;
    --sans: "Jost", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--ivoire);
    color: var(--encre);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
    font-family: var(--serif);
    font-optical-sizing: auto;
    font-weight: 500;
    line-height: 1.1;
    margin: 0 0 .4em;
    letter-spacing: .01em;
}

.conteneur { width: min(1180px, 92%); margin-inline: auto; }

:focus-visible {
    outline: 2px solid var(--rose-fonce);
    outline-offset: 3px;
}

/* ------------------------------------------------------------------ Boutons */

.bouton {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .85rem 1.7rem;
    background: var(--rose);
    color: var(--blanc);
    font-size: .78rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    border: 1px solid var(--rose);
    border-radius: var(--rayon);
    cursor: pointer;
    transition: background .25s, color .25s, border-color .25s;
}
.bouton:hover { background: var(--rose-fonce); border-color: var(--rose-fonce); }
.bouton--ligne { background: transparent; color: var(--rose-fonce); border-color: var(--rose); }
.bouton--ligne:hover { background: var(--rose); color: var(--blanc); }
.bouton--bloc { width: 100%; justify-content: center; }
.bouton[disabled] { opacity: .5; cursor: not-allowed; }

/* ------------------------------------------------------------- En-tête */

.bandeau {
    background: var(--nuit);
    color: var(--nuit-texte);
    font-size: .78rem;
    opacity: .92;
}
.bandeau .conteneur {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .55rem 0;
    flex-wrap: wrap;
}
.bandeau nav { display: flex; gap: 1.4rem; }
.bandeau a:hover { color: var(--or-pale); }

.entete {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(253, 248, 246, .96);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--trait);
}
.entete .conteneur {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: .7rem 0;
}
.logo img { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; }

.menu {
    display: flex;
    gap: 2.1rem;
    margin-inline: auto;
    font-size: .93rem;
}
.menu a { padding-bottom: 4px; border-bottom: 1px solid transparent; }
.menu a:hover, .menu a.actif { border-color: var(--rose); }

.outils { display: flex; align-items: center; gap: 1.1rem; }
.outils a { position: relative; display: flex; }
.pastille {
    position: absolute;
    top: -8px; right: -10px;
    min-width: 18px; height: 18px;
    display: grid; place-items: center;
    background: var(--rose);
    color: var(--blanc);
    border-radius: 50%;
    font-size: .68rem;
}
.burger { display: none; background: none; border: 0; cursor: pointer; }

/* ---------------------------------------------------------------- Héro */

.hero {
    position: relative;
    background: var(--creme);
    overflow: hidden;
}
.hero .conteneur {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    gap: 2rem;
    min-height: 520px;
    padding: 3rem 0;
}
.hero h1 { font-size: clamp(2.9rem, 6.2vw, 5rem); margin-bottom: .1em; }
.hero h1 em {
    display: block;
    font-style: italic;
    color: var(--rose-fonce);
    font-size: .78em;
}
.hero p { max-width: 34ch; color: var(--encre-douce); margin-bottom: 2rem; }
.hero figure {
    margin: 0;
    position: relative;
    aspect-ratio: 1;
    max-width: 460px;
    justify-self: end;
}
.hero figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Silhouette en croissant de lune : signe distinctif de la marque.
       Un masque SVG en pourcentage plutôt qu'un clip-path en pixels,
       pour rester net à toutes les tailles d'écran. */
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cmask id='m'%3E%3Crect width='100' height='100' fill='white'/%3E%3Ccircle cx='63' cy='50' r='37' fill='black'/%3E%3C/mask%3E%3Ccircle cx='44' cy='50' r='47' fill='white' mask='url(%23m)'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cmask id='m'%3E%3Crect width='100' height='100' fill='white'/%3E%3Ccircle cx='63' cy='50' r='37' fill='black'/%3E%3C/mask%3E%3Ccircle cx='44' cy='50' r='47' fill='white' mask='url(%23m)'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    filter: drop-shadow(0 22px 30px rgba(41, 34, 47, .35));
}
.hero .vertical {
    position: absolute;
    right: 1rem; top: 50%;
    transform: translateY(-50%) rotate(180deg);
    writing-mode: vertical-rl;
    letter-spacing: .5em;
    font-size: .7rem;
    color: var(--rose-fonce);
}

/* ------------------------------------------------------------ Garanties */

.garanties {
    background: var(--nuit);
    color: var(--nuit-texte);
}
.garanties .conteneur {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 1.8rem 0;
}
.garantie { display: flex; gap: .9rem; align-items: flex-start; }
.garantie svg { flex: 0 0 auto; color: var(--or-pale); }
.garantie strong { display: block; font-size: .92rem; font-weight: 500; color: var(--nuit-texte); }
.garantie span { font-size: .82rem; color: #cabfc7; }

/* -------------------------------------------------------------- Sections */

.section { padding: 4rem 0; }
.section--creme { background: var(--creme); }

.titre-section { text-align: center; margin-bottom: 2.6rem; }
.titre-section h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.titre-section span {
    display: block;
    margin: .7rem auto 0;
    color: var(--or);
    font-size: 1.3rem;
    line-height: 1;
}

/* Collections */
.collections {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.4rem;
    text-align: center;
}
.collection img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--or-pale);
    outline: 1px solid var(--trait);
    outline-offset: 5px;
    box-shadow: var(--ombre);
    transition: transform .4s;
}
.collection:hover img { transform: scale(1.04); }
.collection p { margin: .9rem 0 0; font-size: .95rem; }

/* Grille produits */
.grille-produits {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 1.6rem;
}

.carte {
    background: var(--blanc);
    border: 1px solid var(--trait);
    border-radius: var(--rayon);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}
.carte__media { position: relative; background: var(--creme); }
.carte__media img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.carte__corps { padding: 1rem; text-align: center; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.carte__nom { font-family: var(--serif); font-size: 1.12rem; }
.carte__prix { font-weight: 500; }
.carte__prix del { color: var(--encre-douce); font-weight: 400; margin-right: .4rem; font-size: .9em; }
.carte .bouton { margin-top: auto; }

.notes { color: var(--rose); letter-spacing: .1em; font-size: .85rem; }

.coeur {
    position: absolute;
    top: .6rem; right: .6rem;
    width: 34px; height: 34px;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, .9);
    border: 0;
    border-radius: 50%;
    color: var(--rose-fonce);
    cursor: pointer;
}

/* Etiquette de stock (mise à jour en temps réel) */
.etiquette {
    position: absolute;
    top: .6rem; left: .6rem;
    padding: .3rem .7rem;
    border-radius: 100px;
    font-size: .72rem;
    letter-spacing: .04em;
    background: var(--blanc);
    color: var(--encre);
    border: 1px solid var(--trait);
}
.etiquette--ok { display: none; }
.etiquette--bas { color: var(--or); border-color: #eedcbb; background: #fdf6e8; }
.etiquette--rupture { color: var(--rose-fonce); background: #fbeceb; border-color: #f2d6d4; }
.etiquette--precommande { color: var(--sauge); background: #edf5ef; border-color: #d6e7da; }

.statut-stock { font-size: .85rem; }
.statut-stock.ok { color: var(--sauge); }
.statut-stock.bas { color: var(--or); }
.statut-stock.rupture { color: var(--rose-fonce); }
.statut-stock.precommande { color: var(--sauge); }

/* Couleurs disponibles (selon le stock de chaque déclinaison) */
.couleurs-disponibles { display: flex; gap: .4rem; align-items: center; justify-content: center; flex-wrap: wrap; margin: .1rem 0; }
.swatch {
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 1px solid rgba(41, 34, 47, .18);
    box-shadow: 0 0 0 1px var(--blanc);
    position: relative;
    cursor: default;
}
.swatch--epuise {
    opacity: .35;
    background-image: linear-gradient(to top right, transparent calc(50% - 1px), rgba(55,43,40,.85), transparent calc(50% + 1px));
}
.produit .couleurs-disponibles { justify-content: flex-start; margin: .3rem 0 .8rem; }
.produit .swatch { width: 28px; height: 28px; }
.couleurs-liste { list-style: none; margin: .3rem 0 .8rem; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.couleurs-liste li { display: flex; align-items: center; gap: .55rem; font-size: .88rem; color: var(--encre-douce); }
.couleurs-liste li.epuise { text-decoration: line-through; opacity: .55; }

/* Bloc cadeau */
.cadeau {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.6rem;
    align-items: stretch;
}
.cadeau__visuel {
    position: relative;
    background: var(--rose-pale);
    border-radius: var(--rayon);
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    overflow: hidden;
}
.cadeau__texte { padding: 2.4rem; }
.cadeau__texte h2 { font-size: 2.2rem; }
.cadeau__texte h2 em { display: block; font-style: italic; color: var(--rose-fonce); }
.cadeau__visuel img { height: 100%; width: 100%; object-fit: cover; }
.cadeau__atouts { display: grid; gap: 1rem; }
.atout {
    display: flex;
    gap: 1rem;
    padding: 1.1rem 1.3rem;
    background: var(--blanc);
    border: 1px solid var(--trait);
    border-radius: var(--rayon);
}
.atout strong { display: block; font-weight: 500; font-size: .95rem; }
.atout span { font-size: .84rem; color: var(--encre-douce); }

/* Galerie sociale */
.social { display: grid; grid-template-columns: 240px 1fr auto; gap: 1.4rem; align-items: center; }
.social h2 { font-family: var(--serif); font-style: italic; font-size: 1.9rem; color: var(--rose-fonce); }
.social__galerie { display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; }
.social__galerie img { aspect-ratio: 1; object-fit: cover; border-radius: var(--rayon); }
.social__bouton {
    width: 72px; height: 72px;
    border: 1px solid var(--rose);
    border-radius: 50%;
    display: grid; place-items: center;
    color: var(--rose-fonce);
}

/* ------------------------------------------------------------ Pied de page */

.pied { background: var(--nuit); color: #d8cdd1; padding: 3.4rem 0 1.4rem; }
.pied .conteneur { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.3fr; gap: 2rem; }
.pied h4 { font-family: var(--sans); font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--or-pale); }
.pied ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; font-size: .9rem; }
.pied a:hover { color: var(--or-pale); }
.pied p { font-size: .9rem; color: #b7abb1; }
.reseaux { display: flex; gap: .7rem; margin-top: 1rem; }
.reseaux a {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border: 1px solid var(--or-pale);
    border-radius: 50%;
    color: var(--or-pale);
}
.reseaux a:hover { background: var(--or-pale); color: var(--nuit); }
.newsletter { display: flex; gap: .5rem; margin-top: .8rem; }
.newsletter input { background: #382f3f; border-color: #4a3f4f; color: var(--nuit-texte); }
.copyright {
    margin-top: 2.4rem;
    padding-top: 1rem;
    border-top: 1px solid #423947;
    text-align: center;
    font-size: .8rem;
    color: #9c8f95;
}

/* ------------------------------------------------------------- Formulaires */

label { display: block; font-size: .85rem; margin-bottom: .3rem; color: var(--encre-douce); }
input, select, textarea {
    width: 100%;
    padding: .75rem .9rem;
    font: inherit;
    font-size: .95rem;
    color: var(--encre);
    background: var(--blanc);
    border: 1px solid var(--trait);
    border-radius: var(--rayon);
}
input:focus, select:focus, textarea:focus { border-color: var(--rose); outline: none; }
.champ { margin-bottom: 1rem; }
.champs-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.alerte {
    padding: .9rem 1.1rem;
    border-radius: var(--rayon);
    border: 1px solid var(--trait);
    background: var(--blanc);
    font-size: .92rem;
    margin-bottom: 1.2rem;
}
.alerte--succes { background: #eef6f0; border-color: #d3e6d8; color: #3d6b4c; }
.alerte--erreur { background: #fbecea; border-color: #f0d3d0; color: #9c4f4a; }

/* ------------------------------------------------- Pages produit / panier */

.fil { font-size: .82rem; color: var(--encre-douce); padding: 1.4rem 0; }

.produit { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.produit__galerie img { border-radius: var(--rayon); }
.miniatures { display: flex; gap: .6rem; margin-top: .7rem; flex-wrap: wrap; }
.miniatures img { width: 74px; height: 92px; object-fit: cover; border-radius: var(--rayon); cursor: pointer; border: 1px solid var(--trait); }
.miniatures img.active { border-color: var(--rose); }
.produit h1 { font-size: 2.5rem; }
.produit__prix { font-size: 1.5rem; color: var(--rose-fonce); margin-bottom: 1rem; }
.encart {
    background: var(--creme);
    border: 1px solid var(--trait);
    border-radius: var(--rayon);
    padding: 1.3rem;
    margin: 1.4rem 0;
}
.encart h3 { font-family: var(--sans); font-size: .95rem; letter-spacing: .04em; }
.quantite { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.quantite input { width: 80px; text-align: center; }

.vente-directe { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1rem; }
.vente-directe a {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .7rem 1.1rem;
    border-radius: 100px;
    font-size: .85rem;
    color: var(--blanc);
}
.vente-directe .messenger { background: #0084ff; }
.vente-directe .instagram { background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); }
.vente-directe .whatsapp { background: #25d366; }

.tableau { width: 100%; border-collapse: collapse; background: var(--blanc); }
.tableau th, .tableau td { padding: .9rem; border-bottom: 1px solid var(--trait); text-align: left; font-size: .93rem; }
.tableau th { font-weight: 500; color: var(--encre-douce); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.tableau img { width: 58px; height: 72px; object-fit: cover; border-radius: var(--rayon); }

.recap {
    background: var(--creme);
    border: 1px solid var(--trait);
    border-radius: var(--rayon);
    padding: 1.6rem;
}
.recap dl { display: grid; grid-template-columns: 1fr auto; gap: .6rem 1rem; margin: 0 0 1.2rem; }
.recap dt { color: var(--encre-douce); font-size: .92rem; }
.recap dd { margin: 0; text-align: right; }
.recap .total { font-size: 1.25rem; font-family: var(--serif); }

.deux-colonnes { display: grid; grid-template-columns: 1.6fr 1fr; gap: 2.4rem; align-items: start; }

/* ---------------------------------------------------------------- Suivi */

.suivi { list-style: none; margin: 2rem 0 0; padding: 0; }
.suivi li {
    position: relative;
    padding: 0 0 1.8rem 2.4rem;
    border-left: 2px solid var(--trait);
}
.suivi li:last-child { border-left-color: transparent; padding-bottom: 0; }
.suivi li::before {
    content: "";
    position: absolute;
    left: -9px; top: 2px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--blanc);
    border: 2px solid var(--trait);
}
.suivi li.fait::before { background: var(--rose); border-color: var(--rose); }
.suivi li.actuel::before { background: var(--blanc); border-color: var(--rose); box-shadow: 0 0 0 5px rgba(217, 161, 164, .22); }
.suivi strong { display: block; font-weight: 500; }
.suivi span { font-size: .84rem; color: var(--encre-douce); }

/* -------------------------------------------------------- Chat flottant */

.chat-flottant {
    position: fixed;
    right: 1.2rem; bottom: 1.2rem;
    z-index: 60;
    display: grid;
    justify-items: end;
    gap: .6rem;
}
.chat-flottant__liens { display: grid; gap: .6rem; }
.chat-flottant__liens a {
    display: flex; align-items: center; gap: .6rem;
    padding: .6rem .95rem;
    background: var(--blanc);
    border: 1px solid var(--trait);
    border-radius: 100px;
    font-size: .85rem;
    box-shadow: var(--ombre);
}
.chat-flottant[hidden] { display: none; }
.chat-flottant__liens[hidden] { display: none; }
.chat-bulle {
    width: 56px; height: 56px;
    border-radius: 50%;
    border: 0;
    background: var(--rose);
    color: var(--blanc);
    display: grid; place-items: center;
    cursor: pointer;
    box-shadow: var(--ombre);
}

/* ------------------------------------------------------------ Responsive */

@media (max-width: 1000px) {
    .hero .conteneur { grid-template-columns: 1fr; }
    .hero figure { justify-self: center; max-width: 360px; }
    .hero .vertical { display: none; }
    .garanties .conteneur { grid-template-columns: repeat(2, 1fr); }
    .collections { grid-template-columns: repeat(3, 1fr); }
    .cadeau, .produit, .deux-colonnes { grid-template-columns: 1fr; }
    .social { grid-template-columns: 1fr; }
    .social__galerie { grid-template-columns: repeat(3, 1fr); }
    .pied .conteneur { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
    .menu {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--ivoire);
        border-bottom: 1px solid var(--trait);
        padding: .5rem 4%;
    }
    .menu.ouvert { display: flex; }
    .menu a { padding: .8rem 0; border-bottom: 1px solid var(--trait); }
    .burger { display: block; }
    .entete .conteneur { position: relative; }
    .logo img { width: 64px; height: 64px; }
    .collections, .garanties .conteneur { grid-template-columns: repeat(2, 1fr); }
    .champs-2 { grid-template-columns: 1fr; }
    .pied .conteneur { grid-template-columns: 1fr; }
    .cadeau__visuel { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
    html { scroll-behavior: auto; }
}

/* Choix de la couleur avant l'ajout au panier */
.choix-couleur { margin: .4rem 0 1rem; }
.choix-couleur__titre { margin: 0 0 .5rem; font-weight: 600; font-size: .9rem; }
.choix-couleur__liste { display: flex; flex-wrap: wrap; gap: .5rem; }
.choix-couleur__item {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .4rem .8rem .4rem .45rem;
    background: var(--blanc); color: inherit; font: inherit; font-size: .88rem;
    border: 1.5px solid rgba(41, 34, 47, .2); border-radius: 999px; cursor: pointer;
}
.choix-couleur__item .swatch { width: 22px; height: 22px; }
.choix-couleur__item small { color: var(--encre-douce); font-size: .75rem; }
.choix-couleur__item.actif { border-color: var(--rose); box-shadow: 0 0 0 2px var(--rose) inset; }
.choix-couleur__item:disabled { opacity: .55; cursor: not-allowed; text-decoration: line-through; }
