/* Mise en page du site. Les couleurs et les polices viennent de theme.css. */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  margin: 0; font-family: var(--font-titre); font-weight: 600;
  line-height: 1.12; letter-spacing: 0;
  font-variation-settings: "opsz" 72;
}
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--ink); color: var(--paper); padding: .6rem 1rem;
}
.skip:focus { top: 1rem; }

/* Séparateur repris du logo : un trait rose, un cœur au milieu */
.separateur {
  --coeur: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 22'%3E%3Cpath d='M12 21C5 15.5 1 11.6 1 7A5.7 5.7 0 0 1 12 4.3 5.7 5.7 0 0 1 23 7c0 4.6-4 8.5-11 14Z' fill='%23E08A99'/%3E%3C/svg%3E");
  background:
    var(--coeur) center top / 20px 18px no-repeat,
    linear-gradient(var(--rose), var(--rose)) left 9px / calc(50% - 22px) 1.5px no-repeat,
    linear-gradient(var(--rose), var(--rose)) right 9px / calc(50% - 22px) 1.5px no-repeat;
  padding-top: 2.4rem;
}

/* ---------- Boutons ---------- */
.button {
  display: inline-block;
  background: var(--button); color: var(--button-ink);
  padding: .85rem 1.5rem; border-radius: 999px;
  text-decoration: none; border: 0; cursor: pointer;
  font: inherit; font-weight: 700;
  transition: background-color .15s, color .15s;
}
.button:hover { background: var(--button-hover); color: var(--button-hover-ink); }
.link { font-weight: 700; }

/* Pastilles (univers et filtres) */
.chip {
  font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer;
  padding: .45rem 1rem; border-radius: 999px;
  border: 1.5px solid var(--rose); background: transparent; color: var(--ink);
  transition: background-color .15s, border-color .15s;
}
.chip:hover { background: var(--blush); }
a.chip { display: inline-block; text-decoration: none; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- Barre du haut ---------- */
.topbar {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem 1rem;
}
.brand { display: block; line-height: 0; }
.brand img { height: 80px; width: auto; }
.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover { color: var(--accent); }
.nav a.nav-contact {
  background: var(--button); color: var(--button-ink); font-weight: 700;
  padding: .45rem 1.1rem; border-radius: 999px;
}
.nav a.nav-contact:hover { background: var(--button-hover); color: var(--button-hover-ink); }
@media (max-width: 560px) {
  .brand img { height: 54px; }
  .nav { gap: .9rem; font-size: .95rem; }
}
@media (max-width: 420px) { .nav a[href="#atelier"] { display: none; } }

/* ---------- Accueil ---------- */
.hero {
  max-width: var(--max); margin: 0 auto;
  padding: 2rem 1rem 3.5rem;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 3.5rem; align-items: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.3rem);
  font-weight: 500; line-height: 1.08; letter-spacing: 0;
  font-variation-settings: "opsz" 96;
  max-width: 16ch;
}
.hero-intro { color: var(--muted); font-size: 1.2rem; max-width: 48ch; margin: 1.4rem 0 1.6rem; }
.univers { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 2rem; padding: 0; list-style: none; }
.hero-figure { margin: 0; position: relative; }
.hero-figure button { all: unset; display: block; cursor: pointer; position: relative; width: 100%; }
.hero-figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.hero-figure figcaption { margin-top: .7rem; color: var(--muted); font-size: .95rem; }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; padding-top: .5rem; }
  .hero-figure { max-width: 440px; }
}
/* Sur téléphone, l'atelier suit directement l'accueil : la pièce mise en avant
   ouvre alors l'onglet « Tout » au lieu d'une grande photo ici. */
@media (max-width: 720px) {
  .hero { padding-bottom: 2.2rem; }
  .hero-figure { display: none; }
}

/* ---------- Étiquette de prix suspendue à un fil (l'élément signature) ---------- */
.nuance-1 { --tag-bg: var(--nuance-1); --tag-fg: var(--nuance-1-ink); }
.nuance-2 { --tag-bg: var(--nuance-2); --tag-fg: var(--nuance-2-ink); }
.nuance-3 { --tag-bg: var(--nuance-3); --tag-fg: var(--nuance-3-ink); }
.nuance-4 { --tag-bg: var(--nuance-4); --tag-fg: var(--nuance-4-ink); }
.nuance-5 { --tag-bg: var(--nuance-5); --tag-fg: var(--nuance-5-ink); }
.nuance-6 { --tag-bg: var(--nuance-6); --tag-fg: var(--nuance-6-ink); }

.tag-wrap {
  position: absolute; top: 22px; right: 16px; z-index: 1;
  transform: rotate(7deg); transform-origin: 14px 50%;
  filter: drop-shadow(0 1px 1.5px rgb(20 16 18 / .3));
}
.tag-wrap::before { /* le fil */
  content: ""; position: absolute; left: 12px; bottom: 50%;
  width: 2px; height: 40px; border-radius: 2px; background: var(--fil);
  transform: rotate(-22deg); transform-origin: bottom center;
}
.tag {
  display: inline-block; margin: 0;
  padding: .35rem .85rem .35rem 1.7rem;
  font-family: var(--font-titre); font-weight: 700; font-size: 1.02rem; white-space: nowrap;
  font-variation-settings: "opsz" 24;
  color: var(--tag-fg, var(--nuance-1-ink));
  background: radial-gradient(circle at 13px 50%, transparent 4px, var(--tag-bg, var(--nuance-1)) 4.6px);
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
}
.tag.is-sold {
  color: var(--sold-ink);
  background: radial-gradient(circle at 13px 50%, transparent 4px, var(--sold) 4.6px);
}
.tag-lg { font-size: 1.4rem; padding: .45rem 1.1rem .45rem 2rem; transform: rotate(-2deg); transform-origin: left center; }

@media (prefers-reduced-motion: no-preference) {
  .card-button:hover .tag-wrap,
  .card-button:focus-visible .tag-wrap,
  .hero-figure button:hover .tag-wrap { animation: swing .9s ease-out; }
  @keyframes swing {
    0% { transform: rotate(7deg); } 30% { transform: rotate(-6deg); }
    60% { transform: rotate(4deg); } 100% { transform: rotate(7deg); }
  }
}

/* ---------- Créations ---------- */
.creations { max-width: var(--max); margin: 0 auto; padding: 2.5rem 1rem 3.5rem; }
.section-head {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem;
  margin-bottom: 2rem;
}
.section-head h2 { flex: 1 1 auto; }
.compte { margin: .3rem 0 0; color: var(--muted); font-size: .95rem; }

/* Onglets des univers : collés en haut pendant qu'on parcourt les créations ;
   sur téléphone, une seule ligne qu'on fait défiler au doigt. */
.onglets-barre {
  position: sticky; top: 0; z-index: 5;
  margin: 0 -1rem 1.8rem; padding: .6rem 0;
  background: var(--paper); border-bottom: 1.5px solid var(--line);
}
.onglets {
  display: flex; gap: .5rem; overflow-x: auto; padding: .15rem 1rem;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.onglets::-webkit-scrollbar { display: none; }
.onglet {
  position: relative; /* garde le texte pour lecteurs d'écran dans la barre qui défile */
  flex: none; display: inline-flex; align-items: center; gap: .45rem;
  font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; white-space: nowrap;
  min-height: 44px; padding: .45rem 1rem; border-radius: 999px;
  border: 1.5px solid var(--rose); background: transparent; color: var(--ink);
  transition: background-color .15s, border-color .15s;
}
.onglet:hover { background: var(--blush); }
.onglet[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.onglet-nombre {
  min-width: 1.6em; padding: 0 .4em; border-radius: 999px; text-align: center;
  font-size: .82rem; line-height: 1.6; background: var(--blush); color: var(--ink);
}
.onglet[aria-selected="true"] .onglet-nombre { background: var(--paper); color: var(--ink); }

/* Sur ordinateur : les sept onglets sur une ligne ; à la ligne seulement s'ils ne tiennent pas */
@media (min-width: 900px) {
  .onglets { flex-wrap: wrap; overflow-x: visible; gap: .4rem; }
  .onglet { padding: .45rem .7rem; gap: .3rem; font-size: .92rem; }
  .onglets { gap: .35rem; }
}

.panneau:focus-visible { outline-offset: 8px; }

/* « Voir plus » sous la grille */
.plus { display: flex; flex-direction: column; align-items: center; gap: .6rem; margin-top: 2.8rem; }
.plus-progres { margin: 0; color: var(--muted); font-size: .95rem; }
.button.secondaire { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.button.secondaire:hover { background: var(--blush); color: var(--ink); }

.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;
}

.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2.5rem 1.6rem;
}
.card-button { all: unset; display: block; cursor: pointer; width: 100%; }
.card-button:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: var(--radius); }
.card-media { position: relative; display: block; }
.card-media img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: var(--radius); background: var(--line);
}
.card.is-sold .card-media img { filter: grayscale(.55) opacity(.8); }
.card-title {
  font-size: 1.18rem; margin: .85rem 0 .1rem;
  font-variation-settings: "opsz" 36;
}
.card-cat { color: var(--muted); font-size: .95rem; margin: 0; }

.message { color: var(--muted); }

@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; }
  .card-title { font-size: 1rem; }
  .card-cat { font-size: .85rem; }
  .grid .tag { font-size: .8rem; padding: .25rem .55rem .25rem 1.45rem; }
  .grid .tag-wrap { top: 16px; right: 8px; }
}

/* ---------- L'atelier : bandeau rose pâle, juste après l'accueil, en version courte ---------- */
.atelier { background: var(--blush); }
.atelier-inner {
  max-width: var(--max); margin: 0 auto; padding: 3rem 1rem;
  display: grid; grid-template-columns: 220px 1fr; gap: 1.5rem 3.5rem; align-items: center;
}
.atelier-visuel img { width: 100%; height: auto; }
#atelier-photo { aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.atelier-texte h2 { margin-bottom: .9rem; }
.atelier-texte p { margin: 0 0 .9rem; max-width: 62ch; font-size: 1.12rem; }
.atelier-resume { font-size: 1.2rem !important; }
.lien-suite {
  justify-self: start;
  font: inherit; font-weight: 700; color: var(--accent); cursor: pointer; padding: .4rem 0; min-height: 44px;
  background: none; border: 0; text-decoration: underline; text-underline-offset: .18em;
}
.lien-suite::after { content: " ↓"; text-decoration: none; display: inline-block; margin-left: .2rem; }
.lien-suite[aria-expanded="true"]::after { content: " ↑"; }
@media (max-width: 720px) {
  /* Sur téléphone : le visuel en petit à côté du titre, pour arriver vite aux créations */
  .atelier-inner { grid-template-columns: 88px 1fr; gap: .4rem 1rem; padding: 2rem 1rem 1.6rem; align-items: start; }
  .atelier-visuel { grid-row: 1; }
  .atelier-texte { display: contents; }
  .atelier-texte h2 { grid-column: 2; grid-row: 1; align-self: center; margin: 0; }
  .atelier-texte > :not(h2) { grid-column: 1 / -1; }
  .atelier-texte p, .atelier-resume { font-size: 1.05rem !important; }
  .atelier-resume { margin-top: .6rem !important; }
}

/* ---------- Comment commander : étapes numérotées ---------- */
.commander { max-width: var(--max); margin: 0 auto; padding: 2.4rem 1rem 1rem; text-align: center; }
.commander h2 { margin-bottom: 2rem; }
.etapes {
  list-style: none; margin: 0 auto; padding: 0; text-align: left;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.6rem 2rem;
}
.etape { position: relative; padding-left: 3.4rem; }
.etape-numero {
  position: absolute; left: 0; top: 0; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--rose); color: var(--ink);
  font-family: var(--font-titre); font-weight: 700; font-size: 1.2rem;
}
.etape h3 { font-size: 1.2rem; margin: .35rem 0 .3rem; }
.etape p { margin: 0; color: var(--muted); }
.commander-note { margin: 1.8rem auto 0; max-width: 62ch; color: var(--muted); }

/* ---------- Contact ---------- */
.contact { max-width: 760px; margin: 0 auto; padding: 4rem 1rem 2rem; text-align: center; }
.contact h2 { margin-bottom: 1rem; }
.contact-text { margin: 0 auto 1.6rem; max-width: 52ch; font-size: 1.15rem; }
/* Adresse e-mail en clair : une ligne discrète sous le bouton, avec « Copier » */
.adresse-mail { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .4rem .7rem; margin: 1rem 0 0; color: var(--muted); font-size: .95rem; }
.adresse-valeur { overflow-wrap: anywhere; }
.detail-info .adresse-mail { justify-content: flex-start; margin-top: .8rem; }
.copier {
  font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer;
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--ink); border-radius: 999px;
  padding: .3rem .9rem; min-height: 2.2rem;
}
.copier:hover { background: var(--blush); }
.contact-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 1.6rem; margin: 0; }

.footer {
  max-width: var(--max); margin: 3rem auto 0; padding: 2rem 1rem 3rem;
  color: var(--muted); font-size: .92rem; border-top: 1px solid var(--line);
}
.footer p { margin: 0 0 .4rem; max-width: 90ch; }

/* ---------- Bandeau « exemple » ---------- */
.notice {
  margin: 0; padding: .55rem 1rem; text-align: center;
  background: var(--notice); color: var(--notice-ink); font-size: .92rem;
}

/* ---------- Page 404 ---------- */
.hero-solo { grid-template-columns: 1fr; min-height: 70vh; }

/* ---------- Fiche détail ---------- */
.detail {
  border: 0; padding: 0; border-radius: var(--radius);
  width: min(960px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem);
  background: var(--surface); color: var(--ink);
}
.detail::backdrop { background: rgb(20 16 18 / .6); }
.detail-body { display: grid; grid-template-columns: 1fr 1fr; }
.detail-media { min-width: 0; display: flex; flex-direction: column; }

/* Galerie de la fiche : une piste qu'on fait glisser, une photo par cran */
.galerie { position: relative; flex: 1; min-height: 0; }
.galerie-piste {
  display: flex; height: 100%; max-height: calc(100dvh - 2rem); aspect-ratio: 4 / 5;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none; background: var(--line);
}
.galerie-piste::-webkit-scrollbar { display: none; }
.galerie-piste img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; scroll-snap-stop: always; }
.galerie-fleche {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 1;
  width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--paper); color: var(--ink); font-size: 1.7rem; line-height: 1;
  box-shadow: 0 1px 4px rgb(20 16 18 / .25);
}
.galerie-fleche:disabled { opacity: 0; pointer-events: none; }
.galerie-prec { left: .7rem; }
.galerie-suiv { right: .7rem; }
.galerie-position {
  position: absolute; left: 50%; bottom: .8rem; transform: translateX(-50%); margin: 0;
  padding: .1rem .7rem; border-radius: 999px; font-size: .88rem; font-weight: 700;
  background: var(--ink); color: var(--paper);
}
.galerie-vignettes { list-style: none; margin: 0; padding: .6rem; display: flex; gap: .45rem; justify-content: center; }
.galerie-vignette {
  display: block; width: 3.4rem; padding: 0; cursor: pointer; border-radius: 8px; overflow: hidden;
  border: 2px solid transparent; background: var(--line); aspect-ratio: 4 / 5;
}
.galerie-vignette img { width: 100%; height: 100%; object-fit: cover; }
.galerie-vignette[aria-current="true"] { border-color: var(--ink); }

/* Sur la carte : le nombre de photos, écrit (pas seulement une icône) */
.card-photos {
  position: absolute; left: .6rem; bottom: .6rem; z-index: 1;
  padding: .05rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700;
  background: var(--paper); color: var(--ink);
}
.detail-info { padding: 2.5rem 2rem 2rem; display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.detail-info h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.detail-cat { margin: 0; color: var(--muted); }
.detail-desc p { margin: 0 0 .8rem; max-width: 52ch; }
.detail-close {
  position: absolute; top: .6rem; right: .6rem; z-index: 2;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  border: 0; background: var(--paper); color: var(--ink);
  font-size: 1.6rem; line-height: 1; cursor: pointer;
}
@media (max-width: 720px) {
  .detail-body { grid-template-columns: 1fr; }
  .galerie-piste { height: auto; width: 100%; max-height: 55dvh; }
  .galerie-vignettes { padding: .5rem .5rem 0; }
  .detail-info { padding: 1.5rem 1.25rem 1.75rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .detail[open] { animation: open .2s ease-out; }
  @keyframes open { from { opacity: 0; transform: translateY(12px); } }
}
