/* Loggrain (boutique fictive). Les couleurs et les polices viennent de demo-boutique/config.mjs, injectées en variables CSS dans chaque page. */
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 400; font-display: swap; src: url(/polices/cormorant-garamond-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 500; font-display: swap; src: url(/polices/cormorant-garamond-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 400; font-display: swap; src: url(/polices/cormorant-garamond-latin-400-italic.woff2) format('woff2'); }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/polices/hanken-grotesk-latin-wght-normal.woff2) format('woff2'); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--fond); color: var(--encre); font: 400 1rem/1.65 var(--police-texte); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, picture { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--police-titre); font-weight: 400; line-height: 1.08; margin: 0; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.5rem, 5.4vw, 4.6rem); }
h2 { font-size: clamp(2rem, 3.6vw, 3.1rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--cognac); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lien-evitement { position: absolute; left: 16px; top: -100px; background: var(--encre); color: var(--fond); padding: 10px 16px; z-index: 100; transition: top 0.15s ease-out; }
.lien-evitement:focus { top: 8px; }
.contenu { width: min(100% - 32px, 1280px); margin-inline: auto; }
.surtitre { font: 600 0.75rem/1.2 var(--police-texte); letter-spacing: 0.16em; text-transform: uppercase; color: var(--discret); margin: 0 0 1rem; }
.lien-fleche { display: inline-block; font-weight: 500; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; transition: letter-spacing 0.2s ease-out; }
.lien-fleche:hover { letter-spacing: 0.02em; }

/* Bande de démonstration */
aside.bande-demo, .bande-demo { background: var(--pierre); color: var(--encre); font-size: 0.8125rem; line-height: 1.45; padding: 8px 0; }
.bande-demo .contenu { display: flex; flex-wrap: wrap; gap: 2px 20px; align-items: baseline; justify-content: space-between; }
.bande-demo p { margin: 0; }
.bande-demo .detail { color: #3F3B33; flex-basis: 100%; font-size: 0.78rem; }
@media (max-width: 600px) { .bande-demo { font-size: 0.75rem; line-height: 1.35; } .bande-demo .detail { font-size: 0.72rem; } }
.bande-demo a { font-weight: 600; }

/* En-tête */
.entete { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--fond) 96%, transparent); border-bottom: 1px solid var(--trait); }
.entete .contenu { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 72px; gap: 16px; }
.logo { font-family: var(--police-titre); font-weight: 500; font-size: 1.55rem; letter-spacing: 0.24em; text-decoration: none; text-align: center; white-space: nowrap; }
.menu { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.menu a { text-decoration: none; font-size: 0.9375rem; padding: 6px 0; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.2s ease-out; }
.menu a:hover, .menu a[aria-current] { background-size: 100% 1px; }
.outils { justify-self: end; display: flex; gap: 20px; font-size: 0.9375rem; }
.outils a { text-decoration: none; }
.bouton-menu { display: none; background: none; border: 0; font: inherit; padding: 10px 0; cursor: pointer; color: inherit; }
@media (max-width: 900px) {
  .entete .contenu { grid-template-columns: 1fr auto 1fr; min-height: 60px; }
  .outils { display: none; }
  .entete nav { display: contents; }
  .bouton-menu { grid-column: 1; grid-row: 1; }
  .logo { grid-column: 2; grid-row: 1; }
  .logo { font-size: 1.15rem; letter-spacing: 0.18em; }
  .js .bouton-menu { display: block; justify-self: start; }
  .js .menu { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; background: var(--fond); border-bottom: 1px solid var(--trait); padding: 8px 16px 16px; }
  .js .menu.ouvert { display: flex; }
  .js .menu a { display: block; padding: 14px 0; font-size: 1.05rem; background: none; }
  html:not(.js) .menu { grid-column: 1 / -1; flex-wrap: wrap; gap: 4px 16px; }
  html:not(.js) .entete .contenu { grid-template-columns: 1fr; padding-block: 10px; }
  .outils { gap: 12px; }
}

/* Accueil : héros */
.heros { position: relative; isolation: isolate; min-height: min(86vh, 820px); display: flex; align-items: flex-end; overflow: hidden; background: var(--avoine); }
.heros picture, .heros img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.heros::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(250 247 241 / 0.9) 0%, rgb(250 247 241 / 0.62) 36%, rgb(250 247 241 / 0) 66%); }
.heros .contenu { padding-block: 72px; }
.heros h1 { max-width: 11ch; animation: monte 0.28s ease-out both; }
.heros p.chapeau { max-width: 30rem; font-size: 1.15rem; margin: 1.4rem 0 2rem; }
@media (max-width: 700px) {
  .heros { min-height: 78vh; }
  .heros::before { background: linear-gradient(0deg, rgb(250 247 241 / 0.94) 0%, rgb(250 247 241 / 0.72) 42%, rgb(250 247 241 / 0) 78%); }
  .heros .contenu { padding-block: 40px; }
}
@keyframes monte { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.bouton { display: inline-block; background: var(--foret); color: #fff; text-decoration: none; font-weight: 500; letter-spacing: 0.04em; padding: 15px 30px; border: 1px solid var(--foret); cursor: pointer; font-family: inherit; font-size: 0.9375rem; transition: background-color 0.2s ease-out, color 0.2s ease-out; }
.bouton:hover { background: var(--encre); border-color: var(--encre); }
.bouton.clair { background: transparent; color: var(--encre); border-color: var(--encre); }
.bouton.clair:hover { background: var(--encre); color: #fff; }

section.bloc { padding-block: clamp(56px, 9vw, 120px); }
.entete-bloc { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: clamp(28px, 4vw, 48px); flex-wrap: wrap; }

/* Catégories */
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; list-style: none; padding: 0; margin: 0; }
.cat { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 5; text-decoration: none; background: var(--pierre); }
.cat img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease-out; }
.cat:hover img { transform: scale(1.035); }
.cat span { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 20px 20px; color: #fff; font: 400 1.7rem/1.1 var(--police-titre); background: linear-gradient(0deg, rgb(20 24 20 / 0.62), rgb(20 24 20 / 0)); }
.cats.peu { grid-template-columns: repeat(2, 1fr); }
.cats.peu .cat { aspect-ratio: 3 / 2; }
@media (max-width: 800px) { .cats { grid-template-columns: repeat(2, 1fr); gap: 10px; } .cat span { font-size: 1.3rem; padding: 28px 14px 14px; } }

/* Grille de produits */
.produits { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 48px) 24px; list-style: none; padding: 0; margin: 0; }
.produits.quatre { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .produits, .produits.quatre { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .produits, .produits.quatre { gap: 28px 12px; } }
.carte a { display: block; text-decoration: none; }
.carte .visuel { position: relative; aspect-ratio: 4 / 5; background: var(--avoine); overflow: hidden; margin-bottom: 14px; }
.carte .visuel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.28s ease-out, transform 0.3s ease-out; }
.carte .visuel .second { opacity: 0; }
.carte a:hover .second, .carte a:focus-visible .second { opacity: 1; }
.carte a:hover .premier { transform: scale(1.02); }
.carte h3 { font-size: 1.35rem; margin-bottom: 2px; }
.carte .accroche { color: var(--discret); font-size: 0.9rem; margin: 0 0 6px; }
.carte .prix { margin: 0; font-weight: 500; }
.barre { color: var(--discret); text-decoration: line-through; margin-left: 8px; font-weight: 400; }
.etiquette { position: absolute; left: 12px; top: 12px; z-index: 2; background: var(--fond); color: var(--encre); font: 600 0.7rem/1 var(--police-texte); letter-spacing: 0.12em; text-transform: uppercase; padding: 7px 10px; }
.etiquette.cognac { background: var(--cognac); color: #fff; }

/* Duos et savoir-faire */
.duo { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 7vw, 112px); align-items: center; }
.duo.inverse { grid-template-columns: 1fr 1.1fr; }
.duo.inverse .duo-image { order: 2; }
.duo-image img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--avoine); }
.duo-texte { max-width: 34rem; }
.duo-texte h2 { margin-bottom: 1.4rem; }
@media (max-width: 800px) { .duo, .duo.inverse { grid-template-columns: 1fr; } .duo.inverse .duo-image { order: 0; } .duo-image img { aspect-ratio: 3 / 2; } }
.trois { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.trois figure { margin: 0; }
.trois img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--avoine); margin-bottom: 18px; }
.trois h3 { margin-bottom: 8px; }
@media (max-width: 800px) { .trois { grid-template-columns: 1fr; gap: 40px; } }
.fond-avoine { background: var(--avoine); }
.faits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.fait { border-top: 1px solid var(--encre); padding-top: 18px; }
.fait h3 { font-size: 1.45rem; margin-bottom: 8px; }
.fait p { margin: 0; color: #3F3B33; }
@media (max-width: 800px) { .faits { grid-template-columns: 1fr; gap: 28px; } }
.engagement { background: var(--foret); color: #fff; text-align: center; padding-block: clamp(72px, 11vw, 140px); }
.engagement blockquote { margin: 0 auto; max-width: 52rem; font: italic 400 clamp(1.8rem, 3.8vw, 3rem)/1.2 var(--police-titre); }
.engagement p { margin: 28px auto 0; max-width: 34rem; color: #E7EEE9; }

/* Page intérieure */
.page-titre { padding-block: clamp(40px, 7vw, 88px) clamp(24px, 4vw, 48px); }
.page-titre p.chapeau { max-width: 40rem; color: #3F3B33; font-size: 1.15rem; margin: 1.2rem 0 0; }
.fil { font-size: 0.85rem; color: var(--discret); padding-top: 24px; }
.fil ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.fil li + li::before { content: '/'; margin-right: 6px; }
.fil a { text-decoration: none; }
.fil a:hover { text-decoration: underline; }
.texte-long { max-width: 44rem; }
.texte-long h2 { font-size: 2rem; margin: 2.2em 0 0.6em; }
.texte-long h2:first-child { margin-top: 0; }
.tableau { width: 100%; border-collapse: collapse; margin: 1rem 0 2rem; font-size: 0.95rem; }
.tableau th, .tableau td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--trait); }
.tableau th { font-weight: 600; color: var(--encre); }
.tableau caption { text-align: left; font-weight: 600; padding-bottom: 8px; }
.defilement { overflow-x: auto; }
details.faq { border-top: 1px solid var(--trait); }
details.faq:last-of-type { border-bottom: 1px solid var(--trait); }
details.faq summary { cursor: pointer; padding: 20px 0; font: 400 1.35rem/1.3 var(--police-titre); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: '+'; font-family: var(--police-texte); transition: transform 0.2s ease-out; }
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq .reponse { padding: 0 0 20px; max-width: 42rem; color: #3F3B33; }

/* Fiche produit */
.fiche { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); padding-block: 16px clamp(56px, 8vw, 112px); align-items: start; }
.galerie { display: grid; grid-template-columns: 84px 1fr; gap: 14px; }
.galerie .vignettes { display: flex; flex-direction: column; gap: 10px; }
.galerie .vignettes button { padding: 0; border: 1px solid transparent; background: var(--avoine); cursor: pointer; aspect-ratio: 4 / 5; overflow: hidden; transition: border-color 0.15s ease-out; }
.galerie .vignettes button[aria-current='true'] { border-color: var(--encre); }
.galerie .vignettes img { width: 100%; height: 100%; object-fit: cover; }
.galerie .principale { background: var(--avoine); aspect-ratio: 4 / 5; overflow: hidden; }
.galerie .principale img { width: 100%; height: 100%; object-fit: cover; }
.galerie .principale img[hidden] { display: none; }
.galerie.sans-vignettes { display: block; }
@media (min-width: 901px) { .galerie { position: sticky; top: 96px; } }
@media (max-width: 900px) { .fiche { grid-template-columns: 1fr; } .galerie { grid-template-columns: 1fr; } .galerie .vignettes { flex-direction: row; order: 2; } .galerie .vignettes button { width: 72px; } }
.achat { position: sticky; top: 96px; }
@media (max-width: 900px) { .achat { position: static; } }
.achat h1 { font-size: clamp(2.2rem, 4vw, 3.3rem); margin: 6px 0 6px; }
.achat .matiere { color: var(--discret); margin: 0 0 20px; }
#prix { min-height: 3.2rem; font-size: 1.6rem; font-weight: 500; margin-bottom: 4px; }
#prix .barre { font-size: 1.1rem; }
#prix .remise { display: inline-block; margin-left: 10px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; color: #fff; background: var(--cognac); padding: 4px 8px; vertical-align: middle; }
.couleur { margin: 18px 0 6px; font-size: 0.95rem; }
.tailles-titre { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 0 10px; font-size: 0.95rem; }
.tailles-titre button { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }
.tailles { display: flex; flex-wrap: wrap; gap: 8px; min-height: 48px; }
.tailles button { min-width: 52px; min-height: 48px; padding: 0 14px; background: transparent; border: 1px solid var(--encre); color: var(--encre); font: inherit; cursor: pointer; transition: background-color 0.15s ease-out, color 0.15s ease-out; }
.tailles button:hover:not([disabled]) { background: var(--avoine); }
.tailles button[aria-pressed='true'], .tailles button[aria-pressed='true']:hover:not([disabled]) { background: var(--encre); color: #fff; }
.tailles button[disabled] { color: #6F6A5F; border-color: var(--trait); text-decoration: line-through; cursor: not-allowed; }
#stock { min-height: 1.7rem; margin: 14px 0 0; font-weight: 500; }
#stock.limite { color: var(--cognac); }
.acheter { width: 100%; margin-top: 18px; padding: 18px; font-size: 1rem; }
#message-achat { margin: 14px 0 0; padding: 14px 16px; background: var(--foretClair); color: var(--encre); display: none; }
#message-achat.visible { display: block; }
.livraison-fiche { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--trait); }
.livraison-fiche label { font-size: 0.9rem; color: var(--discret); display: block; margin-bottom: 6px; }
.livraison-fiche select { font: inherit; padding: 10px 12px; border: 1px solid var(--encre); background: var(--fond); color: var(--encre); min-width: 12rem; }
#livraison-texte { min-height: 4.2rem; margin: 12px 0 0; }
.details { margin-top: 28px; }
.details details { border-top: 1px solid var(--trait); }
.details details:last-child { border-bottom: 1px solid var(--trait); }
.details summary { cursor: pointer; padding: 16px 0; font-weight: 500; list-style: none; display: flex; justify-content: space-between; }
.details summary::-webkit-details-marker { display: none; }
.details summary::after { content: '+'; transition: transform 0.2s ease-out; }
.details details[open] summary::after { transform: rotate(45deg); }
.details .corps { padding: 0 0 18px; color: #3F3B33; }
.details .corps p { margin: 0 0 0.6em; }
.mesures { width: 100%; height: auto; max-width: 560px; }
.pastille { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--encre); vertical-align: -3px; margin-right: 8px; }
.legende-tailles { font-size: 0.8rem; color: var(--discret); margin: 8px 0 0; }
.zoom { display: block; padding: 0; border: 0; background: none; width: 100%; height: 100%; cursor: zoom-in; }
.zoom img { transition: transform 0.3s ease-out; }
.zoom:hover img { transform: scale(1.015); }
dialog#zoom { border: 0; padding: 0; background: var(--fond); width: min(96vw, 1100px); max-height: 96vh; overflow: auto; }
dialog#zoom::backdrop { background: rgb(20 24 20 / 0.82); }
dialog#zoom img { width: 100%; height: auto; display: block; }
dialog#zoom .fermer { position: fixed; top: 16px; right: 16px; z-index: 2; background: var(--fond); border: 1px solid var(--encre); padding: 10px 16px; font: inherit; cursor: pointer; color: var(--encre); }
.table-livraison { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table-livraison th, .table-livraison td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--trait); }
.aussi { padding-block: clamp(48px, 7vw, 96px); border-top: 1px solid var(--trait); }

/* Pied de page */
.pied { background: var(--avoine); padding-block: 72px 32px; margin-top: 0; }
.pied .colonnes { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.pied h2 { font: 600 0.75rem/1.2 var(--police-texte); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 14px; color: var(--discret); }
.pied ul { list-style: none; padding: 0; margin: 0; }
.pied li { margin-bottom: 8px; }
.pied a { text-decoration: none; }
.pied a:hover { text-decoration: underline; }
.pied .logo { text-align: left; display: inline-block; margin-bottom: 14px; }
.pied .fictive { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--pierre); font-size: 0.85rem; color: #3F3B33; }
@media (max-width: 800px) { .pied .colonnes { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .pied .colonnes { grid-template-columns: 1fr; } }

/* Page d'essai */
.essai-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: etape; margin: 0; padding: 0; list-style: none; }
.essai-grille li { counter-increment: etape; border-top: 1px solid var(--encre); padding-top: 16px; }
.essai-grille li::before { content: counter(etape); font: 400 2.4rem/1 var(--police-titre); display: block; margin-bottom: 8px; }
@media (max-width: 800px) { .essai-grille { grid-template-columns: 1fr; } }
.phrase { background: var(--avoine); padding: 18px 20px; margin: 0 0 16px; position: relative; }
.phrase p { margin: 0 0 8px; overflow-wrap: anywhere; }
.texte-long, .visite dd { overflow-wrap: anywhere; }
.phrase .langue { font: 600 0.7rem/1 var(--police-texte); letter-spacing: 0.12em; text-transform: uppercase; color: var(--discret); }
.phrase button { font: inherit; font-size: 0.85rem; background: var(--fond); border: 1px solid var(--encre); padding: 8px 14px; cursor: pointer; color: var(--encre); }
.phrase button:hover { background: var(--encre); color: #fff; }
.deux-versions { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 800px) { .deux-versions { grid-template-columns: 1fr; gap: 8px; } }
.visites { margin: 0; padding: 0; list-style: none; }
.visite { border: 1px solid var(--trait); background: #fff; padding: 16px 18px; margin-bottom: 12px; }
.visite strong { font-weight: 600; }
.visite dl { margin: 10px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: 0.9rem; }
.visite dt { color: var(--discret); }
.visite dd { margin: 0; }
.note { font-size: 0.9rem; color: #3F3B33; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print { .bande-demo, .entete, .pied { display: none; } }
