:root {
  --txt: #111;
  --muted: #555;
  --brand: #C6002A;
  --bg: #fff;
  --bg-soft: #fafafa;
  --ok: #0a7f38;
}

/* Reset */
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.6;
}

/* 🎄 Background festif */
body {
  background-color: #a3f679;
  background-image: url("data:image/svg+xml,%3Csvg width='70' height='70' viewBox='0 0 70 70' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ff0000' fill-opacity='0.4' fill-rule='evenodd'%3E%3Cpath d='M0 0h35v35H0V0zm5 5h25v25H5V5zm5 5h15v15H10V10zm5 5h5v5h-5v-5zM40 5h25v25H40V5zm5 5h15v15H45V10zm5 5h5v5h-5v-5zM70 35H35v35h35V35zm-5 5H40v25h25V40zm-5 5H45v15h15V45zm-5 5h-5v5h5v-5zM30 40H5v25h25V40zm-5 5H10v15h15V45zm-5 5h-5v5h5v-5z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 140px;
}


/* Hero */
header.hero {
  background: rgba(255, 255, 255, 0.92);
  padding: 28px;
  border-radius: 14px;
  margin: 20px auto;
  max-width: 1100px;
}

/* Logo Hero */
.logo {
  display: block;
  margin: 0 auto 16px auto; /* centré */
  max-width: 400px; /* élargi (avant 120px) */
  height: auto;
}

/* Logo Footer */
.logo-footer {
  display: block;
  margin: 0 auto 20px auto;
  max-width: 200px; /* avant 80px */
  height: auto;
  opacity: 0.95;
}


/* Zones de contenu en "cartes blanches" */
header.hero,
main section,
footer {
  background: #fff;
  border-radius: 14px;
  padding: 28px 20px;
  margin: 20px auto;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  max-width: 1100px;
}

/* On enlève la transparence qu’on avait avant dans le Hero */
header.hero {
  background: #fff;
}

.kicker {
  color: var(--brand);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 0 0 6px;
}

h1 {
  font-size: 2rem;
  line-height: 1.25;
  margin: .2em 0 .4em;
}

h2 {
  font-size: 1.5rem;
  margin: 1.6em 0 .6em;
}

h3 {
  margin: .2em 0 .4em;
}

p {
  margin: .6em 0;
  color: #222;
}

/* Grid */
.grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Card */
.card {
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 16px;
  background: #fff;
}

/* Boutons principaux */
.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 700;
  transition: all 0.25s ease-in-out;
}

/* Hover + focus */
.btn:hover,
.btn:focus {
  background: #a50021; /* rouge plus foncé */
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(198,0,42,0.35);
  opacity: 1;
}


/* Ancres Hero */
header.hero nav {
  margin-top: 12px;
}
header.hero nav a {
  display: inline-block;
  margin: 4px 6px 0 0;
  background: #ffe8ed;
  color: #8a001a;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: .9rem;
  text-decoration: none;
  transition: all .2s ease;
}
header.hero nav a:hover {
  background: var(--brand);
  color: #fff;
}

/* Notes et badges */
.note {
  font-size: .95rem;
  color: var(--muted);
}
.badge {
  display: inline-block;
  background: #ffe8ed;
  color: #8a001a;
  border: 1px solid #ffc9d3;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .85rem;
  margin-right: 6px;
}
.pill {
  display: inline-block;
  background: #eef8f1;
  color: #0a7f38;
  border: 1px solid #cfe9d7;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .85rem;
  margin-right: 6px;
}

/* FAQ */
.faq details {
  border-bottom: 1px solid #ddd;
  margin-bottom: 10px;
  padding: 5px 0;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq summary h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}
.faq summary::after {
  content: "▶";
  transition: transform .3s ease;
  font-size: .9rem;
  margin-left: 8px;
  color: #666;
}
.faq details[open] summary::after {
  transform: rotate(90deg);
}

/* Footer */
footer {
  margin-top: 40px;
  border-top: 1px solid #eee;
  padding-top: 24px;
  font-size: .95rem;
  color: var(--muted);
}

/* Gallery */
.gallery {
  display: grid;
  gap: 12px;
}
@media (min-width: 900px) {
  .gallery { grid-template-columns: repeat(4, 1fr); }
}


/* --- Optimisations mobile additionnelles --- */

/* 1) Images & galerie plus souples */
img { max-width: 100%; height: auto; }
.gallery img { aspect-ratio: 3 / 2; height: auto; } /* plutôt qu'une hauteur fixe */

/* 2) Boutons plus confortables sur petits écrans */
@media (max-width: 480px) {
  .btn, .btn-ghost { display: block; width: 100%; text-align: center; margin-bottom: 8px; }
}

/* 3) Chips d’ancres : scroll horizontal en très petit viewport si besoin */
@media (max-width: 380px) {
  header.hero nav { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 8px; }
  header.hero nav a { white-space: nowrap; }
}

/* 4) Espacements un poil plus serrés sur mobile */
@media (max-width: 480px) {
  .grid { gap: 12px; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.25rem; }
}

/* Confort de lecture : marges internes */
header.hero,
main section,
footer {
  padding-left: 20px;
  padding-right: 20px;
}

/* Sur grand écran : centrage + largeur max */
header.hero,
main,
footer {
  max-width: 1100px;
  margin: auto;
}

/* Centrage global des CTA */
section p:last-child,
.card p:last-child,
header.hero p:last-child,
footer p:last-child {
  text-align: center;
}

/* Option : si tu veux centrer uniquement les boutons, pas tout le texte */
.btn,
.btn-ghost {
  display: inline-block;
  margin: 6px auto;
}

/* grille responsive */
.gallery.humeur, .gallery.humour {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* tuiles portrait plus hautes */
.gallery.humeur .thumb, .gallery.humour .thumb {
  aspect-ratio: 2 / 3;       /* plus haut que 3/4 */
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid #eee;
  position: relative;
}

/* images : recadrage + point focal vers le haut */
.gallery.humeur .thumb img, .gallery.humour .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;  /* remonte le cadre pour garder les têtes */
  display: block;
  transition: transform 180ms ease;
  will-change: transform;
}

/* zoom fiable : hover ET focus clavier */
.gallery.humeur .thumb:hover img,
.gallery.humour .thumb:hover img,
.gallery.humeur .thumb:focus img,
.gallery.humour .thumb:focus img {
  transform: scale(1.06);
}

/* accessibilité : utilisateurs qui réduisent les animations */
@media (prefers-reduced-motion: reduce) {
  .gallery.humeur .thumb img,
  .gallery.humour .thumb img { transition: none; }
}

/* Bandeau global 16:9 (image statique) */
.banner.tendances {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #eee;
  margin: 0 0 16px 0;
}
.banner.tendances img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%; /* cadre légèrement haut pour voir les visages */
  display: block;
}

/* Galeries : grille responsive */
.gallery {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Tuiles portrait (visages visibles) */
.gallery .thumb {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid #eee;
  position: relative;
}
.gallery .thumb > img,
.gallery .thumb > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;    /* on remonte le cadrage par défaut */
  transition: transform 180ms ease;
  will-change: transform;
}

/* Zoom au survol + focus clavier */
.gallery .thumb:hover > img,
.gallery .thumb:hover > video,
.gallery .thumb:focus-within > img,
.gallery .thumb:focus-within > video {
  transform: scale(1.06);
}

/* Seconde main : 4 colonnes dès que possible */
@media (min-width: 992px) {
  .gallery.sm { grid-template-columns: repeat(4, 1fr); }
}

/* --- Fix mobiles : pas de scroll horizontal, centrage, safe areas --- */
*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;         /* coupe tout débordement latéral */
  -webkit-tap-highlight-color: transparent;
}

/* évite qu’un élément (galerie/bandeau/bouton) déborde et fasse bouger la page */
.banner, .gallery, header.hero, main section, footer { overflow: hidden; }

/* images et médias ne dépassent jamais la largeur dispo */
img, video { max-width: 100%; height: auto; display: block; }

/* CTA : l’effet scale peut créer un débordement sur mobile → on le désactive en touch */
@media (hover: none) {
  .btn { transition: box-shadow .2s; }
  .btn:hover, .btn:focus { transform: none; box-shadow: none; }
  .btn:active { transform: scale(0.98); }  /* léger feedback au tap */
}

/* petits écrans : évite toute mise en page plus large que le viewport */
@media (max-width: 480px) {
  header.hero, main section, footer { padding-left: 16px; padding-right: 16px; }
}

/* iOS “notch” (safe areas) : garde le contenu centré même en pinch-zoom */
:root {
  --safe-l: env(safe-area-inset-left);
  --safe-r: env(safe-area-inset-right);
}
header.hero, main section, footer { padding-left: max(16px, var(--safe-l)); padding-right: max(16px, var(--safe-r)); }

/* Galerie avec légendes */
.gallery figure {
  margin: 0;
}

.gallery img{
  width:100%;
  aspect-ratio: 3 / 2;   /* ratio par défaut */
  height:auto;
  object-fit:cover;
  border-radius:10px;
  border:1px solid #eee;
  background:#f6f6f6;
  display:block;
}

.gallery figcaption {
  font-size: 0.85rem;
  color: #555;
  text-align: center;
  margin-top: 6px;
}

/* Bandeau dans le Hero */
.hero-banner {
  margin: 12px 0 20px 0;
}

.hero-banner img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #eee;
  display: block;
}

/* Variante : une seule image dans la galerie */
.gallery.une-seule-image {
  display: flex;
  justify-content: center;
}

.gallery.une-seule-image figure {
  max-width: 350px; /* 🔹 ajuste ici selon le rendu souhaité */
  width: 90%;        /* garde du responsive */
  margin: auto;
}

.gallery.une-seule-image img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid #eee;
  object-fit: cover;
}

/* En-tête de section responsable : titre + badges */
.section-head{
  display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
  margin-bottom:8px;
}
.section-head h3{ margin:0; }

/* Badges de certification (GOTS, etc.) */
.cert-badges{ display:flex; align-items:center; gap:10px; }
.cert-badges img{
  height:42px; width:auto; display:block;
  filter: none; /* garde les couleurs officielles */
}
@media (max-width: 520px){
  .cert-badges img{ height:36px; }
}

/* Encadré explication GOTS */
.cert-explainer{
  background:#fff8f2;
  border:1px solid #ffe1c8;
  border-radius:10px;
  padding:12px 14px;
  margin:10px 0 16px;
}
.cert-explainer h4{ margin:.2em 0 .4em; color:#a14a00; font-size:1.05rem; }
.cert-explainer ul{
  margin:8px 0 8px; padding-left:18px;
  text-align:left; list-style:disc inside;
}
.cert-explainer li{ margin:4px 0; }
.cert-explainer .note{ margin:6px 0 0; }


/* Galerie ECO : images plus petites */
.gallery.eco {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.gallery.eco .thumb {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid #eee;
}

.gallery.eco img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  display: block;
}

/* Grille responsive propre */
.grid.trends {
  display: grid;
  gap: 16px;
  align-items: start;
  grid-template-columns: 1fr;                       /* mobile */
}
@media (min-width: 700px) {
  .grid.trends { grid-template-columns: repeat(2, minmax(0, 1fr)); }  /* tablette */
}
@media (min-width: 1024px) {
  .grid.trends { grid-template-columns: repeat(3, minmax(0, 1fr)); }  /* desktop */
}

.grid.trends .card { min-width: 0; }

.grid.trends .thumb {
  aspect-ratio: 2 / 3; overflow: hidden; border-radius: 10px; border: 1px solid #eee;
}
.grid.trends .thumb img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; display: block;
}


