/* ==========================================================
   Chiot Zen Maître Serein — Daniel Bussières
   ========================================================== */

:root {
  --cream: #f6f0e6;
  --green: #24483b;
  --green-dark: #163128;
  --muted: #60695f;
  --gold: #b48249;
  --gold-deep: #9a6b36;
  --paper: #fffdf9;
  --ivory: #fff6e8;
  --line: #ddd8cc;
  --error: #a8432f;
  --gallery-bg: #000;
  --serif: 'Libre Caslon Text', Georgia, 'Times New Roman', serif;
  --sans: 'Hanken Grotesk', Arial, Helvetica, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

/* Ascenseur discret, aux couleurs du site (quand il est nécessaire) */
html { scrollbar-width: thin; scrollbar-color: #24483b40 transparent; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--green);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* Grain de papier */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .07;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--green); color: var(--ivory); }

button:focus-visible,
a:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

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

header {
  position: relative;
  max-width: 1500px;
  margin: auto;
  padding: 30px 5%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid #24483b20;
}
header .brand { justify-self: start; }
header .actions { justify-self: end; }

.brand {
  font-size: 15px;
  letter-spacing: 3px;
  text-decoration: none;
  color: inherit;
  font-weight: 700;
}
.brand span {
  display: block;
  letter-spacing: 1px;
  font-size: 10px;
  font-weight: normal;
  margin-top: 7px;
}

.actions { display: flex; align-items: center; gap: 24px; }

nav { display: flex; align-items: center; gap: 12px; font-size: 11px; }
nav button {
  background: none;
  border: 0;
  color: var(--muted);
  padding: 10px 3px;
  cursor: pointer;
  font: inherit;
}
nav button[aria-pressed=true] {
  color: var(--green);
  font-weight: bold;
  border-bottom: 2px solid var(--gold);
}
nav button,
.brand { transition: color .25s; }
nav button:hover,
.brand:hover { color: var(--gold); }

.contact-btn {
  display: inline-block;
  text-decoration: none;
  font: inherit;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: bold;
  color: var(--green);
  background: none;
  border: 1px solid #24483b55;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  transition: background .3s, color .3s, border-color .3s;
}
.contact-btn:hover,
.contact-btn[aria-current=page] {
  background: var(--green);
  border-color: var(--green);
  color: var(--ivory);
}

/* ---------- Bouton Galerie (centre de l'en-tête) ---------- */

.gallery-btn {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 10px 15px;
  font: inherit;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--green);
  background: var(--cream);
  border: 1px solid #24483b55;
  border-radius: 999px;
  cursor: pointer;
  transition: background .3s, color .3s, border-color .3s;
}
.gallery-btn svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--gold); transition: color .3s; }
.gallery-btn:hover { background: var(--green); border-color: var(--green); color: var(--ivory); }
.gallery-btn:hover svg { color: var(--ivory); }

/* ---------- Héros ---------- */

main { max-width: 1500px; margin: auto; }

.hero {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  min-height: 740px;
  padding: 35px 5% 45px;
  gap: 6%;
}

.copy { padding: 32px 0 12px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  letter-spacing: 2.4px;
  font-weight: 600;
  margin: 0 0 27px;
  color: var(--gold);
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: currentColor;
}

h1 {
  font-family: var(--serif);
  font-size: clamp(48px, 5.2vw, 82px);
  font-weight: normal;
  letter-spacing: -2.5px;
  line-height: 1.06;
  margin: 0 0 25px;
  text-wrap: balance;
}
h1 em { font-weight: normal; color: var(--gold-deep); }

.volume {
  letter-spacing: 2px;
  font-size: 10px;
  font-weight: 700;
  margin: 0 0 32px;
}

.intro {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.38;
  max-width: 420px;
  margin: 0 0 18px;
  text-wrap: pretty;
}

.description {
  font-size: 14px;
  line-height: 1.85;
  max-width: 480px;
  color: var(--muted);
  margin: 0 0 25px;
  text-wrap: pretty;
}

.details {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 15px;
  font-size: 10px;
  letter-spacing: .3px;
}
.details span + span::before {
  content: '·';
  margin-right: 15px;
  color: var(--gold);
}

/* ---------- Librairies ---------- */

.stores {
  margin-top: 35px;
  padding-top: 24px;
  border-top: 1px solid #24483b26;
}
.stores h2 {
  font-size: 11px;
  font-weight: normal;
  line-height: 1.5;
  margin: 0 0 16px;
}

.buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.store {
  position: relative;
  min-height: 110px;
  padding: 16px 6px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--green);
  text-align: center;
  text-decoration: none;
  cursor: default;
  box-shadow: 0 2px 6px #24483b06;
  transition: box-shadow .4s var(--ease);
}
a.store { cursor: pointer; }

.store > span {
  height: 49px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  white-space: nowrap;
}
.store b { font-weight: bold; }

.store small {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 9px;
  letter-spacing: .4px;
  color: var(--muted);
}
.store small::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

.store:focus-visible { box-shadow: 0 18px 32px -18px #12251c80, 0 6px 14px -10px #24483b40; }

/* Logos */
.store .amazon-logo {
  position: relative;
  display: block;
  width: 110px;
  margin: auto;
  padding: 0 0 0 8px;
  text-align: left;
  color: #232f3e;
}
.amazon-logo b { font-size: 24px; letter-spacing: -1.4px; line-height: 26px; }
.amazon-logo svg { position: absolute; width: 74px; height: 14px; left: 9px; top: 22px; }
.amazon-logo i {
  position: absolute;
  right: 9px;
  bottom: 0;
  font-size: 12px;
  font-style: normal;
  letter-spacing: 1px;
}

.store .kobo-logo {
  flex-direction: column;
  align-items: flex-start;
  width: 80px;
  margin: auto;
  gap: 0;
  color: #bf0000;
}
.kobo-logo i {
  font-size: 12px;
  line-height: 13px;
  font-style: normal;
  font-weight: bold;
  letter-spacing: -.5px;
}
.kobo-logo b {
  font-size: 35px;
  line-height: 35px;
  letter-spacing: -2px;
  font-weight: 400;
}

.store .google-logo { gap: 6px; color: #5f6368; }
.google-logo img { object-fit: contain; flex-shrink: 0; }
.google-logo > span { font-size: 11px; line-height: 16px; text-align: left; }
.google-logo b { font-size: 13px; font-weight: 500; }

/* ---------- Photo ---------- */

/* La photo garde ses proportions (1346 × 2000) : elle s'affiche en entier, sans être recadrée. */
.photo { min-width: 0; }
figure {
  position: relative;
  width: 100%;
  aspect-ratio: 1346 / 2000;
  margin: 0;
  border-radius: 180px 180px 8px 8px;
  overflow: hidden;
  background: #758177;
}
figure img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
figure::after {
  content: '';
  position: absolute;
  inset: 55% 0 0;
  background: linear-gradient(transparent, #12251c9c);
  pointer-events: none;
}

.image-note {
  position: absolute;
  bottom: 60px;
  left: 30px;
  z-index: 1;
  font-family: var(--serif);
  font-size: 36px;
  font-style: italic;
  line-height: 1.15;
  letter-spacing: -.5px;
  color: var(--ivory);
}

figcaption {
  position: absolute;
  bottom: 24px;
  left: 30px;
  z-index: 1;
  color: var(--ivory);
  font-size: 10px;
  letter-spacing: 1px;
}

@media (hover: hover) {
  .store:hover { box-shadow: 0 18px 32px -18px #12251c80, 0 6px 14px -10px #24483b40; }
  figure { transition: box-shadow .6s var(--ease); }
  figure:hover { box-shadow: 0 34px 60px -28px #12251c99, 0 12px 24px -16px #24483b55; }
}

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

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 35px;
  border-top: 1px solid #24483b20;
  padding: 25px 5%;
  font-size: 11px;
}
footer p { margin: 0; }
footer strong {
  display: block;
  margin-bottom: 7px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: normal;
}
footer p > span { font-size: 10px; color: var(--muted); }

.footnote {
  max-width: 360px;
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
  text-wrap: pretty;
}
.copyright { font-size: 9px; white-space: nowrap; color: var(--muted); }

/* ---------- Page contact ---------- */

.contact-page {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  align-items: start;
  gap: 7%;
  min-height: 700px;
  padding: 35px 5% 70px;
}
.contact-page h1 { font-size: clamp(44px, 4.6vw, 72px); }
.contact-page .description { margin-bottom: 0; }

.direct {
  max-width: 440px;
  margin-top: 35px;
  padding-top: 24px;
  border-top: 1px solid #24483b26;
}
.direct h2 {
  font-size: 11px;
  font-weight: normal;
  line-height: 1.5;
  margin: 0 0 16px;
}

/* Carte du formulaire, en arche comme la photo */
.form-card {
  position: relative;
  padding: 96px 44px 44px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 220px 220px 10px 10px;
  box-shadow: 0 30px 60px -36px #12251c55;
  animation: rise .9s var(--ease) .35s backwards;
}

.form-head { text-align: center; margin-bottom: 30px; }
.form-head .eyebrow,
.form-success .eyebrow { justify-content: center; margin-bottom: 14px; }
.form-head .eyebrow::before { display: none; }
.form-head h2,
.form-success h2 {
  font-family: var(--serif);
  font-weight: normal;
  font-size: 32px;
  letter-spacing: -1px;
  margin: 0;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--green);
  background: #faf6ef;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.field textarea { min-height: 160px; resize: vertical; line-height: 1.6; }
.field select {
  appearance: none;
  padding-right: 44px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 8 5 5 5-5' fill='none' stroke='%2324483b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
}
.field ::placeholder { color: #8d948c; opacity: 1; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: #c9c2b3; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  background-color: #fff;
  border-color: var(--green);
  box-shadow: 0 0 0 4px #b4824926;
}
.field [aria-invalid=true] { border-color: var(--error); }
.field [aria-invalid=true]:focus { box-shadow: 0 0 0 4px #a8432f1f; }

.field-error {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--error);
}
.field-error:empty { display: none; }

.hp { display: none; }

.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 6px;
}
.privacy-note {
  margin: 0;
  max-width: 250px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-shrink: 0;
  font: inherit;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ivory);
  background: var(--green);
  border: 0;
  border-radius: 999px;
  padding: 16px 26px;
  cursor: pointer;
  transition: background .3s, opacity .3s;
}
.submit-btn svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.submit-btn:hover { background: var(--green-dark); }
.submit-btn:hover svg { transform: translateX(3px); }
.submit-btn:disabled { opacity: .6; cursor: progress; }

.form-status {
  margin: 18px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.form-status:empty { margin: 0; }
.form-status:empty { display: none; }
.form-status[data-tone=error] { color: var(--error); }

.form-success { text-align: center; padding: 40px 0 60px; }
.form-success:focus { outline: none; }
.success-icon {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 22px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--gold);
  animation: rise .7s var(--ease) backwards;
}
.success-icon svg { width: 28px; height: 28px; }
.form-success p { margin: 12px 0 26px; font-size: 14px; color: var(--muted); }

.link-btn {
  font: inherit;
  font-size: 12px;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color .25s;
}
.link-btn:hover { color: var(--gold); }

.email-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.email-text {
  flex: 1;
  min-width: 0;
  text-align: left;
  color: var(--green);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.email-btn {
  display: inline-block;
  text-decoration: none;
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: bold;
  border-radius: 999px;
  padding: 11px 16px;
  background: var(--green);
  color: var(--ivory);
  white-space: nowrap;
  transition: background .3s;
}
.email-btn:hover { background: var(--green-dark); }

.gmail-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .25s;
}
.gmail-link:hover { color: var(--gold); }

/* ---------- Fenêtre Galerie (diaporama) ---------- */

html:has(.gallery[open]) { overflow: hidden; }

.gallery {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--gallery-bg);
  color: var(--ivory);
  overflow: hidden;
  overscroll-behavior: contain;
}
.gallery::backdrop { background: var(--gallery-bg); }
.gallery[open] {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  animation: fade-in .45s ease;
}

.gallery-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 4% 18px;
}
.gallery .eyebrow { margin: 0 0 10px; }
.gallery h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: normal;
  letter-spacing: -1px;
}

.gallery-round {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #fff6e838;
  background: #fff6e80a;
  color: var(--ivory);
  cursor: pointer;
  transition: background .3s, color .3s, border-color .3s;
}
.gallery-round:hover { background: var(--ivory); border-color: var(--ivory); color: var(--green); }
.gallery-round svg { width: 18px; height: 18px; }

/* Scène */
.gallery-stage {
  position: relative;
  min-height: 0;
  padding: 0 calc(4% + 72px);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.gallery-slides {
  --caption-space: 42px; /* hauteur réservée à la légende */
  position: relative;
  width: 100%;
  height: 100%;
  container-type: size;
}

.gallery-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .9s ease, visibility 0s linear .9s;
}
.gallery-slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity .9s ease;
}

.gallery-frame {
  flex: none;
  width: 100%;
  display: flex;
  justify-content: center;
}
.gallery-frame picture { display: contents; }
.gallery-frame img {
  display: block;
  max-width: 100%;
  max-height: calc(100cqh - var(--caption-space));
  width: auto;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 40px 80px -40px #000000b3;
  cursor: pointer;
  transform: scale(1.035);
  transition: transform 5s cubic-bezier(.2, .6, .3, 1);
}
.gallery-slide.is-active .gallery-frame img { transform: scale(1); }

.gallery-caption {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 4px 14px;
  margin: 0;
  min-height: 26px;
  text-align: center;
}
.gallery-index {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.gallery-text {
  font-family: var(--serif);
  font-size: 19px;
  font-style: italic;
  color: #fff6e8e6;
}

.gallery-nav { position: absolute; top: calc(50% - 21px); transform: translateY(-50%); }
.gallery-nav.prev { left: 4%; }
.gallery-nav.next { right: 4%; }

/* Bas : lecture / pause + miniatures */
.gallery-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 20px 4% 28px;
}

.gallery-play { position: relative; }
.gallery-play .ring {
  position: absolute;
  inset: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  transform: rotate(-90deg);
  pointer-events: none;
}
.ring circle { fill: none; stroke-width: 2; }
.ring-progress {
  stroke: var(--gold);
  stroke-dasharray: 145;
  stroke-dashoffset: 145;
  stroke-linecap: round;
}
.gallery.is-ticking .ring-progress { animation: gallery-countdown var(--gallery-delay, 4s) linear forwards; }
@keyframes gallery-countdown { to { stroke-dashoffset: 0; } }

.gallery-play .icon-play { display: none; }
.gallery.is-paused .gallery-play .icon-play { display: block; }
.gallery.is-paused .gallery-play .icon-pause { display: none; }
.gallery-play:hover .ring-progress { stroke: var(--green); }

.gallery-thumbs {
  position: relative;
  display: flex;
  gap: 8px;
  min-width: 0;
  max-width: min(720px, 100%);
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.gallery-thumbs::-webkit-scrollbar { display: none; }

.gallery-thumb {
  flex: none;
  width: 46px;
  height: 58px;
  padding: 0;
  border: 0;
  border-radius: 23px 23px 4px 4px;
  overflow: hidden;
  background: #fff6e81a;
  opacity: .42;
  cursor: pointer;
  transition: opacity .35s, box-shadow .35s, transform .35s var(--ease);
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb:hover { opacity: .8; transform: translateY(-2px); }
.gallery-thumb.is-active { opacity: 1; box-shadow: 0 0 0 2px var(--gallery-bg), 0 0 0 3.5px var(--gold); }

/* ---------- Animations d'entrée ---------- */

@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes unveil { from { clip-path: inset(100% 0 0 0); } }
@keyframes settle { from { transform: scale(1.08); } }
@keyframes fade-in { from { opacity: 0; } }

header { animation: fade-in .8s ease backwards; }
.copy > * { animation: rise .9s var(--ease) backwards; }
.copy > :nth-child(1) { animation-delay: .15s; }
.copy > :nth-child(2) { animation-delay: .25s; }
.copy > :nth-child(3) { animation-delay: .38s; }
.copy > :nth-child(4) { animation-delay: .46s; }
.copy > :nth-child(5) { animation-delay: .54s; }
.copy > :nth-child(6) { animation-delay: .62s; }
.copy > :nth-child(7) { animation-delay: .72s; }
figure { animation: unveil 1.3s cubic-bezier(.7, 0, .2, 1) .1s backwards; }
figure img { animation: settle 2s var(--ease) .1s backwards; }
.image-note,
figcaption { animation: rise .9s var(--ease) backwards; }
.image-note { animation-delay: 1.05s; }
figcaption { animation-delay: 1.2s; }
footer { animation: fade-in .8s ease .9s backwards; }

/* ---------- Adaptatif ---------- */

@media (max-width: 900px) {
  .hero { gap: 4%; grid-template-columns: 1.12fr 1fr; }
  .intro { font-size: 23px; }

  .buttons { grid-template-columns: 1fr; }
  .store {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 79px;
    padding: 12px;
  }
  .store > span { margin: 0 !important; }
  .store small { margin: 0; }
  .store .google-logo { justify-content: flex-start; }

  figure { border-radius: 130px 130px 8px 8px; }
  .image-note { font-size: 29px; }

  .contact-page { grid-template-columns: 1fr; gap: 48px; min-height: 0; }
  .contact-page .copy { max-width: 560px; padding-bottom: 0; }
}

/* Ordinateur et tablette : la page tient dans la hauteur de la fenêtre, sans ascenseur.
   --k vaut 0 pour une fenêtre de 640 px de haut et 100px à partir de 1140 px :
   les espacements, le titre et les boutons des librairies s'ajustent entre les deux. */
@media (min-width: 621px) {
  :root { --k: clamp(0px, (100vh - 640px) / 5, 100px); }

  body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
  }
  header {
    width: 100%;
    margin: 0 auto;
    padding-block: calc(14px + var(--k) * .16);
  }
  main {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0 auto;
  }

  .hero {
    flex: 1;
    min-height: 0;
    padding-top: calc(12px + var(--k) * .23);
    padding-bottom: calc(16px + var(--k) * .29);
  }
  .hero .copy {
    align-self: center;
    padding-top: calc(var(--k) * .32);
    padding-bottom: calc(var(--k) * .12);
  }
  /* La photo prend toute la hauteur disponible ; sa largeur suit ses proportions. */
  .photo {
    container-type: size;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }
  figure { width: min(100cqw, 100cqh * .673); }

  .eyebrow { margin-bottom: calc(14px + var(--k) * .13); }
  h1 {
    font-size: clamp(44px, min(5.2vw, 46px + var(--k) * .36), 82px);
    margin-bottom: calc(12px + var(--k) * .13);
  }
  .volume { margin-bottom: calc(14px + var(--k) * .18); }
  .intro {
    font-size: min(26px, calc(21px + var(--k) * .05));
    margin-bottom: calc(10px + var(--k) * .08);
  }
  .description { margin-bottom: calc(12px + var(--k) * .13); }
  .stores {
    margin-top: calc(16px + var(--k) * .19);
    padding-top: calc(12px + var(--k) * .12);
  }
  .stores h2 { margin-bottom: calc(8px + var(--k) * .08); }

  /* Page contact */
  .contact-page {
    flex: 1;
    min-height: 0;
    align-items: center;
    padding-top: calc(12px + var(--k) * .23);
    padding-bottom: calc(16px + var(--k) * .29);
  }
  .contact-page h1 { font-size: clamp(40px, min(4.6vw, 42px + var(--k) * .3), 72px); }
  .direct {
    margin-top: calc(18px + var(--k) * .17);
    padding-top: calc(14px + var(--k) * .1);
  }
  .form-card {
    padding-top: calc(56px + var(--k) * .40);
    padding-bottom: calc(28px + var(--k) * .16);
  }
  .form-head { margin-bottom: calc(14px + var(--k) * .16); }
  .field { gap: calc(5px + var(--k) * .03); margin-bottom: calc(12px + var(--k) * .06); }
  .field input,
  .field select { padding-block: calc(10px + var(--k) * .04); }
  .field textarea { min-height: 80px; height: calc(96px + var(--k) * .78); }

  footer { padding-block: calc(12px + var(--k) * .13); }
}

@media (min-width: 901px) {
  .store {
    min-height: calc(80px + var(--k) * .30);
    padding-top: calc(6px + var(--k) * .10);
    padding-bottom: calc(5px + var(--k) * .09);
  }
}

@media (max-width: 620px) {
  header {
    padding: 22px 6%;
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  /* Le bouton Galerie se pose à cheval sur la ligne sous l'en-tête */
  .gallery-btn {
    position: absolute;
    left: 50%;
    bottom: 0;
    z-index: 2;
    transform: translate(-50%, 50%);
    padding: 8px 15px 8px 12px;
    font-size: 10px;
  }

  .gallery-top { padding: 18px 5% 14px; }
  .gallery h2 { font-size: 22px; }
  .gallery .eyebrow { margin-bottom: 6px; }
  .gallery-round { width: 42px; height: 42px; }
  .gallery-stage { padding: 0 5%; }
  .gallery-slides { --caption-space: 64px; }
  .gallery-nav { display: none; }
  .gallery-text { font-size: 16px; }
  .gallery-bottom { gap: 14px; padding: 16px 5% 22px; justify-content: flex-start; }
  .gallery-thumb { width: 38px; height: 48px; }
  .actions { gap: 14px; }
  .contact-btn { padding: 8px 13px; font-size: 10px; }

  .hero {
    display: flex;
    flex-direction: column;
    padding: 10px 6% 28px;
    gap: 30px;
  }
  .copy { padding-top: 25px; }
  .eyebrow { font-size: 9px; margin-bottom: 22px; }
  h1 { font-size: 58px; }
  .volume { font-size: 9px; margin-bottom: 25px; }
  .intro { font-size: 25px; }
  .description { font-size: 14px; }
  .details { font-size: 9px; gap: 8px 10px; }
  .details span + span::before { margin-right: 10px; }

  .stores { margin-top: 27px; }
  .buttons { gap: 9px; }
  .store { padding: 17px 15px; }
  .store > span { font-size: 14px; }

  figure { width: min(100%, 460px); margin-inline: auto; border-radius: 150px 150px 8px 8px; }
  .image-note { font-size: 34px; }

  footer {
    padding: 24px 6%;
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
  .footnote { max-width: 100%; }

  .contact-page { padding: 10px 6% 40px; gap: 36px; }
  .contact-page h1 { font-size: 46px; }
  .field-row { grid-template-columns: 1fr; }
  .form-card { padding: 84px 22px 28px; border-radius: 160px 160px 10px 10px; }
  .form-head h2 { font-size: 28px; }
  .form-foot { flex-direction: column-reverse; align-items: stretch; text-align: center; }
  .privacy-note { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after { transition-duration: .01ms !important; transition-delay: 0s !important; }
  header, footer, .copy > *, figure, figure img, .image-note, figcaption,
  .form-card, .success-icon, .gallery[open] { animation: none; }
  .gallery-frame img,
  .gallery-slide.is-active .gallery-frame img { transform: none; }
}
