/* ICI – La Ressourcerie du Der. Un seul motif : l'arche des conteneurs de collecte.
   Couleurs du logo : bleu, rouge, gris. */
:root {
  --bg: #f3f5f7;
  --surface: #e3e9ef;
  --ink: #1c446b;
  --muted: #4c6a86;
  --o2: #25537f;
  --o3: #2f6596;
  --o4: #a9c0d6;
  --o5: #c9d8e6;
  --red: #c33f37;
  --red-dark: #a3312a;
  --grey: #8a94a0;

  --small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --lead: clamp(1.375rem, 1rem + 1.3vw, 2.125rem);
  --head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --display: clamp(2.5rem, 1rem + 4.4vw, 5.25rem);

  --m: clamp(16px, 2.2vw, 32px);
  --gap: clamp(16px, 1.7vw, 24px);
  --sec: clamp(96px, 12vw, 200px);
  --arch: 100vmax 100vmax 0 0;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "General Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: var(--body);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, blockquote, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
h1, h2 { font-weight: 700; letter-spacing: -0.02em; line-height: 0.95; text-wrap: balance; }
h1 { font-size: var(--display); }
h2 { font-size: var(--head); }
h3 { font-size: var(--lead); font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.on-dark :focus-visible { outline-color: var(--bg); }

.wrap { padding-inline: var(--m); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.sec { margin-top: var(--sec); }
.lead { font-size: var(--lead); line-height: 1.2; letter-spacing: -0.01em; }
.small { font-size: var(--small); }
.arch { border-radius: var(--arch); overflow: hidden; }
.arch img { width: 100%; height: 100%; object-fit: cover; }

/* Bouton : un seul modèle, carré, plein */
.btn {
  display: inline-block;
  padding: 0.85em 1.4em;
  background: var(--red);
  color: var(--bg);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.btn:hover { background: var(--red-dark); }
.btn:active { transform: translateY(2px); }
.btn.light { background: var(--bg); color: var(--ink); }
.btn.light:hover { background: var(--o5); }
.link { text-underline-offset: 0.2em; text-decoration-thickness: 2px; transition: opacity 0.2s; }
.link:hover { opacity: 0.65; }

/* La marque : trois conteneurs */
.mark { display: inline-flex; align-items: flex-end; gap: 0.1em; height: 1.7em; font-weight: 700; line-height: 1; }
.mark i {
  font-style: normal;
  width: 1.05em;
  display: grid;
  place-items: end center;
  padding-bottom: 0.14em;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--arch);
}
.mark i:nth-child(1) { height: 80%; }
.mark i:nth-child(2) { height: 100%; }
.mark i:nth-child(3) { height: 90%; }
.brand { display: inline-flex; align-items: flex-end; gap: 0.6em; text-decoration: none; font-weight: 500; }
.seal { display: block; width: 56px; height: 56px; flex: none; }
.seal text { font-family: inherit; font-weight: 700; }
.brand { align-items: center; }

/* Rangée de conteneurs */
.arches { display: flex; gap: 6px; height: 56px; overflow: hidden; width: 100%; }
.arches i { flex: 0 0 28px; background: var(--ink); border-radius: var(--arch); }

/* ---------- Accueil : première vue ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; padding: var(--m); min-height: 100svh; }
.card { background: var(--surface); min-width: 0; overflow: hidden; display: flex; flex-direction: column; text-align: center; }
.card-in { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 40px 32px; }
.card .brand { flex-direction: column; align-items: center; gap: 12px; }
.card .brand .seal { width: clamp(128px, 11vw, 176px); height: auto; }
.card p { max-width: 36ch; }
.card nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; padding: 0 24px 28px; }
.card nav a, .bar nav a { text-decoration: none; padding: 4px 0; transition: opacity 0.2s; }
.card nav a:hover, .bar nav a:hover { opacity: 0.6; }
.hero-photo { position: relative; border-radius: var(--arch); overflow: hidden; background: var(--o5); min-height: 60svh; }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.6s ease; }
.hero-photo img.on { opacity: 1; animation: drift 9s ease-out both; }
@keyframes drift { from { transform: scale(1.07); } to { transform: scale(1); } }
.rise { animation: rise 0.9s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms); }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---------- Phrase d'ouverture ---------- */
.statement { width: min(100% - 2 * var(--m), 62rem); margin: var(--sec) auto 0; text-align: center; font-size: var(--lead); font-weight: 500; line-height: 1.22; letter-spacing: -0.01em; }
.statement img { display: inline-block; height: 0.9em; width: 1.25em; object-fit: cover; vertical-align: -0.1em; margin: 0 0.12em; border-radius: var(--arch); }

/* ---------- Étapes : accordéon ---------- */
.how-top h2 { grid-column: 1 / 7; }
.how-top p { grid-column: 8 / 13; align-self: end; }
.acc { margin-top: 64px; }
.panel { background: var(--c); color: var(--t); position: relative; overflow: hidden; }
.panel h3 { font-size: inherit; letter-spacing: 0; }
.panel-tab { all: unset; box-sizing: border-box; display: block; width: 100%; padding: 20px 24px; font-size: var(--lead); font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; cursor: pointer; }
.panel-tab:focus-visible { outline: 3px solid var(--t); outline-offset: -6px; }
.panel-body { display: grid; gap: 24px; padding: 0 24px 28px; }
.panel-body p { max-width: 38ch; }
.panel-body .arch { aspect-ratio: 4 / 3; }
.js .panel:not(.open) .panel-body { display: none; }

@media (min-width: 900px) {
  .js .acc { display: flex; height: 540px; }
  .js .panel { flex: 0 1 84px; min-width: 84px; transition: flex-grow 0.45s var(--ease); }
  .js .panel.open { flex-grow: 1; }
  .js .panel:not(.open) .panel-tab { position: absolute; inset: 0; width: auto; display: flex; writing-mode: vertical-rl; transform: rotate(180deg); padding: 24px 26px; }
  .js .panel:not(.open):hover { filter: brightness(1.08); }
  .js .panel.open .panel-tab { padding: 28px 32px 0; font-size: min(var(--head), 2.5rem); cursor: default; }
  .js .panel-body { position: absolute; inset: 110px 0 0 0; grid-template-columns: 1fr 1fr; align-items: end; padding: 0 32px 32px; animation: fade 0.5s 0.25s both; }
  .js .panel-body .arch { height: 100%; aspect-ratio: auto; align-self: stretch; max-height: 390px; margin-top: auto; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Chiffres : trois conteneurs en escalier ---------- */
.stats .tile { border-radius: var(--arch); padding: 28px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; }
.stats .tile strong { font-size: var(--display); line-height: 0.9; letter-spacing: -0.03em; }
.stats .tile span { max-width: 22ch; }
.t1 { grid-column: 1 / 7; height: clamp(440px, 70vh, 680px); background: var(--ink); color: var(--bg); }
.stats-right { grid-column: 7 / 13; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: relative; align-items: start; }
.stats-right h2 { position: absolute; top: 0; left: 0; font-size: var(--lead); line-height: 1.1; }
.t2 { margin-top: 14vh; height: clamp(300px, 44vh, 440px); background: var(--o3); color: var(--bg); }
.t3 { margin-top: 26vh; height: clamp(240px, 34vh, 340px); background: var(--o5); }

/* ---------- L'association : panneau sombre ---------- */
.about-panel { position: relative; overflow: hidden; background: var(--ink); color: var(--bg); min-height: clamp(760px, 105svh, 1000px); padding: 56px; display: grid; grid-template-columns: 63% 1fr; align-content: start; }
.about-panel h2 { max-width: 9.5em; }
.about-photo { position: absolute; left: 56px; top: 270px; bottom: -6%; width: 38vw; border-radius: var(--arch); overflow: hidden; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-text { display: grid; gap: 56px; max-width: 340px; }
.about-text h3 { margin-bottom: 12px; }
.about-text .btn { justify-self: start; }

/* ---------- On le prend ici ? ---------- */
.check-left { grid-column: 1 / 7; display: grid; gap: 28px; align-content: start; }
.check form { display: flex; gap: 8px; }
.check input { flex: 1; min-width: 0; font: inherit; color: inherit; background: var(--surface); border: 0; padding: 0.85em 1em; }
.check input::placeholder { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; color: inherit; background: var(--surface); border: 0; padding: 0.5em 0.9em; cursor: pointer; transition: background 0.2s, transform 0.2s var(--ease); }
.chip:hover { background: var(--o5); }
.chip:active { transform: translateY(2px); }
.verdict { grid-column: 8 / 13; min-height: 460px; border-radius: var(--arch); background: var(--surface); padding: 32px; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; transition: background 0.35s, color 0.35s; }
.verdict strong { font-size: var(--head); line-height: 0.95; letter-spacing: -0.02em; }
.verdict[data-v="oui"] { background: var(--ink); color: var(--bg); }
.verdict[data-v="non"] { background: var(--o5); }
.verdict.pop strong { animation: rise 0.45s var(--ease) both; }

/* ---------- Témoignages ---------- */
.voices h2 { grid-column: 2 / 9; margin-bottom: 64px; }
.voices .portrait { grid-column: 2 / 6; aspect-ratio: 3 / 4; }
.voices-text { grid-column: 7 / 13; margin-top: 120px; display: grid; gap: 32px; align-content: start; }
.voices blockquote p.big { font-size: var(--lead); line-height: 1.2; letter-spacing: -0.01em; margin-bottom: 16px; }
.voices blockquote p { max-width: 46ch; }
.voices .more { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: 32px; }
.voices footer { margin-top: 12px; font-weight: 500; }
.voices .thumb { width: 34%; aspect-ratio: 1; margin: 32px 0 0 auto; }

/* ---------- Un mot, un bouton ---------- */
.cta { display: block; margin-top: var(--sec); background: var(--o5); color: var(--ink); text-decoration: none; border-radius: 14vw 14vw 0 0; overflow: hidden; transition: background 0.15s, color 0.15s; }
.cta:hover, .cta:focus-visible { background: var(--o3); color: var(--bg); }
.cta-top { display: flex; justify-content: space-between; gap: 24px; padding: 6vw 15vw 0; font-size: var(--lead); line-height: 1.2; }
.cta-top span { max-width: 24ch; }
.cta svg { flex: none; width: 48px; height: 48px; transition: transform 0.3s var(--ease); }
.cta:hover svg { transform: translate(6px, -6px); }
.cta b { display: block; margin: 9vw var(--m) 0; padding-bottom: 24px; font-size: calc((100vw - 2 * var(--m)) / 3.72); line-height: 0.8; letter-spacing: -0.04em; white-space: nowrap; }

/* ---------- Pied de page ---------- */
.foot { background: var(--ink); color: var(--bg); padding: var(--m); padding-top: 64px; }
.bigmark { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; align-items: end; height: clamp(180px, 34svh, 340px); }
.bigmark i { font-style: normal; font-weight: 700; font-size: min(21vw, 28svh, 280px); line-height: 0.8; display: grid; place-items: end center; padding-bottom: 0.08em; background: var(--bg); color: var(--ink); border-radius: var(--arch); overflow: hidden; }
.bigmark i:nth-child(1) { height: 72%; color: var(--red); }
.bigmark i:nth-child(2) { height: 100%; color: var(--grey); }
.bigmark i:nth-child(3) { height: 86%; }
.foot-cols { margin-top: 56px; row-gap: 40px; }
.foot-cols > div { grid-column: span 2; }
.foot-cols > .addr { grid-column: 9 / 13; }
.foot-cols h2 { font-size: var(--body); letter-spacing: 0; line-height: 1.45; font-weight: 500; opacity: 0.7; margin-bottom: 10px; }
.foot-cols li + li { margin-top: 6px; }
.foot-cols a { text-decoration: none; transition: opacity 0.2s; }
.foot-cols a:hover { opacity: 0.6; }
.foot-end { margin-top: 64px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; font-size: var(--small); }

/* ---------- Pages intérieures ---------- */
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; padding: 20px var(--m); }
.bar nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; }
.bar nav a[aria-current] { font-weight: 700; }
.phead { padding-top: clamp(32px, 5vw, 80px); align-items: end; }
.phead-text { grid-column: 1 / 8; display: grid; gap: 28px; padding-bottom: 8px; }
.phead-text .lead { max-width: 30ch; }
.phead-text .btn { justify-self: start; }
.phead .arch { grid-column: 9 / 13; aspect-ratio: 4 / 5; }
.phead-side { grid-column: 9 / 13; align-self: end; display: grid; gap: 12px; background: var(--surface); padding: 32px; border-radius: var(--arch); padding-top: 38%; }
.row > .side { grid-column: 1 / 7; align-self: start; position: sticky; top: 24px; display: grid; gap: 36px; }
.side .arch { width: 62%; aspect-ratio: 4 / 5; }
.row > .txt { grid-column: 7 / 13; display: grid; gap: 20px; align-content: start; max-width: 62ch; }
.txt h3 { margin-top: 20px; }
.txt .btn { justify-self: start; }
.dots li { position: relative; padding-left: 1.5em; }
.dots li + li { margin-top: 8px; }
.dots li::before { content: ""; position: absolute; left: 0; top: 0.3em; width: 0.6em; height: 0.82em; background: currentColor; border-radius: var(--arch); }
.band { background: var(--surface); padding-block: clamp(56px, 7vw, 112px); }
.band.dark { background: var(--ink); color: var(--bg); }
.places { display: grid; grid-template-columns: 1fr 1fr; gap: 28px var(--gap); }
.places dt { font-weight: 700; margin-bottom: 4px; }
.legal { grid-column: 4 / 10; display: grid; gap: 20px; }
.legal h2 { font-size: var(--lead); line-height: 1.1; margin-top: 36px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px var(--gap); }
.form label { display: grid; gap: 6px; font-weight: 500; }
.form .full { grid-column: 1 / -1; }
.form input, .form textarea { font: inherit; font-weight: 400; color: inherit; background: var(--surface); border: 0; padding: 0.8em 1em; width: 100%; }
.form textarea { min-height: 180px; resize: vertical; }
.form .btn { justify-self: start; }

/* ---------- Entrées au défilement ---------- */
.js [data-r] { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.js [data-r].in { opacity: 1; transform: none; }

/* ---------- Téléphone et tablette ---------- */
@media (max-width: 899px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 0; min-height: 0; }
  .hero-photo { order: -1; min-height: 40svh; }
  .card .brand span { display: none; }
  .card .brand .seal { width: 104px; }
  .card { margin-top: -24px; position: relative; }
  .arches { height: 40px; }
  .card-in { padding: 28px 20px 32px; gap: 18px; }
  .statement { text-align: left; font-size: clamp(1.25rem, 5.4vw, 1.5rem); }
  .how-top h2, .how-top p { grid-column: 1 / -1; }
  .how-top p { margin-top: 20px; }
  .acc { margin-top: 40px; }
  .t1 { grid-column: 1 / -1; height: clamp(230px, 46vw, 340px); }
  .stats-right { grid-column: 1 / -1; margin-top: 8px; padding-top: 0; }
  .stats-right h2 { position: static; grid-column: 1 / -1; order: -1; margin: 32px 0 16px; }
  .t2 { margin-top: 0; height: 56vw; }
  .t3 { margin-top: 32px; height: 56vw; }
  .stats .tile { padding: 20px; }
  .about-panel { display: block; padding: 32px 24px 0; min-height: 0; }
  .about-text { margin-top: 40px; gap: 32px; max-width: none; }
  .about-photo { position: static; width: 86%; aspect-ratio: 4 / 5; margin: 48px auto -18%; }
  .check-left, .verdict { grid-column: 1 / -1; }
  .verdict { min-height: 300px; margin-top: 32px; }
  .voices h2 { grid-column: 1 / -1; margin-bottom: 40px; }
  .voices .portrait { grid-column: 1 / 10; }
  .voices-text { grid-column: 1 / -1; margin-top: 32px; }
  .voices .more { grid-template-columns: 1fr; }
  .voices .thumb { width: 100%; aspect-ratio: 16 / 9; margin-top: 40px; }
  .cta-top { padding: 14vw 12vw 0; font-size: var(--body); }
  .cta svg { width: 32px; height: 32px; }
  .foot-cols > div { grid-column: span 6; }
  .foot-cols > .addr { grid-column: 1 / -1; }
  .phead-text, .phead .arch, .phead-side { grid-column: 1 / -1; }
  .phead .arch { margin-top: 40px; aspect-ratio: 1; }
  .phead-side { margin-top: 40px; padding-top: 32%; }
  .row > .side, .row > .txt { grid-column: 1 / -1; }
  .row > .side { position: static; gap: 24px; }
  .side .arch { width: 100%; aspect-ratio: 16 / 10; }
  .row > .txt { margin-top: 28px; max-width: none; }
  .bigmark { height: clamp(120px, 30vw, 240px); }
  .legal { grid-column: 1 / -1; }
  .form, .places { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .js [data-r] { opacity: 1; transform: none; }
  .hero-photo img.on { transform: none; }
}
