@import url('https://fonts.googleapis.com/css2?family=Anton&family=Instrument+Sans:wght@400;500;600&display=swap');

:root {
  --papier: #f2ece0;
  --encre: #16130f;
  --rouge: #d1341f;
  --bleu: #1b3a53;
  --gris: #7a6f5f;
  --trait: rgba(22, 19, 15, .22);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  overflow-x: hidden;
}

.enveloppe { position: relative; max-width: 1120px; margin: 0 auto; padding: 0 28px; }

a { color: var(--rouge); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--rouge);
  outline-offset: 3px;
}

.titre {
  font-family: Anton, Impact, "Haettenschweiler", sans-serif;
  font-weight: 400;
  text-transform: lowercase;
  letter-spacing: -.005em;
}

/* ---------- barre ---------- */
.barre {
  display: flex; align-items: baseline; gap: 18px;
  padding: 22px 0 18px;
  border-bottom: 3px solid var(--encre);
}
.barre img { height: 30px; width: auto; align-self: center; }
.barre .nom {
  font-family: Anton, Impact, sans-serif; font-size: 26px; letter-spacing: .01em;
  text-transform: lowercase; color: inherit; text-decoration: none;
}
.barre .depuis-barre { font-size: 13px; font-weight: 500; letter-spacing: .14em; color: var(--gris); }
.barre nav { margin-left: auto; display: flex; gap: 22px; font-size: 15px; font-weight: 600; }
.barre nav a { color: var(--encre); text-decoration: none; }
.barre nav a:hover { color: var(--rouge); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 56px 0 46px; }
.hero h1 {
  font-family: Anton, Impact, sans-serif; font-weight: 400; text-transform: lowercase;
  font-size: clamp(52px, 9.4vw, 118px);
  line-height: .86;
  letter-spacing: -.005em;
  margin: 0 0 26px;
  max-width: 9ch;
}
.hero p { font-size: clamp(17px, 2vw, 21px); max-width: 34ch; margin: 0 0 10px; text-wrap: pretty; }
.hero .depuis { font-weight: 600; color: var(--rouge); }

.rond {
  position: absolute; right: -80px; top: 10px;
  width: 460px; height: 460px; border-radius: 50%;
  background: var(--rouge);
  z-index: -1;
}
.hero .illustration {
  position: absolute; right: 0; top: 46px; width: 360px; height: auto;
  mix-blend-mode: multiply;
}
.tampon {
  position: absolute; right: 400px; top: 352px;
  width: clamp(120px, 16vw, 170px);
  transform: rotate(-14deg);
  animation: tamponner .7s cubic-bezier(.2,1.3,.4,1) both;
}
@keyframes tamponner {
  0%   { opacity: 0; transform: rotate(-30deg) scale(2.6); }
  70%  { opacity: 1; transform: rotate(-12deg) scale(.94); }
  100% { opacity: 1; transform: rotate(-14deg) scale(1); }
}

/* ---------- boutons ---------- */
.bouton {
  display: inline-block; font-family: Anton, Impact, sans-serif; font-weight: 400;
  text-transform: lowercase; font-size: 22px; letter-spacing: .02em;
  color: var(--papier); background: var(--encre);
  padding: 14px 30px 11px; border: 0; border-radius: 0; cursor: pointer;
  text-decoration: none;
}
.bouton:hover { background: var(--rouge); }
.bouton.secondaire {
  background: none; color: var(--encre); border: 3px solid var(--encre); padding: 11px 27px 8px;
}
.bouton.secondaire:hover { background: var(--encre); color: var(--papier); }
.bouton:disabled { opacity: .5; cursor: default; }

/* ---------- la bande des gestes ---------- */
.gestes {
  width: 100vw; margin-left: calc(50% - 50vw);
  background: var(--encre); color: var(--papier);
  border-top: 3px solid var(--encre);
  padding: 38px max(28px, calc((100vw - 1064px) / 2)) 48px;
}
.gestes h2 {
  font-family: Anton, Impact, sans-serif; font-weight: 400; text-transform: lowercase;
  font-size: clamp(26px, 3.6vw, 34px); margin: 0 0 6px;
}
.gestes .aide { margin: 0 0 26px; max-width: 52ch; color: #cdc4b4; }

.grille {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px; list-style: none; margin: 0;
}
.grille li { display: flex; }

.geste {
  display: flex; flex-direction: column; gap: 12px;
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; color: inherit; width: 100%; text-align: left;
}
.geste .dessin {
  background: var(--papier); height: 156px;
  display: flex; align-items: flex-end; justify-content: center; padding: 10px;
  transition: background .12s ease;
}
.geste .dessin img { max-height: 136px; max-width: 100%; width: auto; mix-blend-mode: multiply; }
.geste:hover .dessin { background: #fff; }
.plaque {
  font-family: Anton, Impact, sans-serif; font-weight: 400; text-transform: lowercase;
  font-size: 17px; line-height: 1.1; color: var(--papier);
  background: none; padding: 0; border-radius: 0; box-shadow: none;
  display: block; min-height: 0;
}
.geste[aria-pressed="true"] .dessin { background: var(--rouge); }
.geste[aria-pressed="true"] .plaque { color: var(--rouge); }

/* ---------- composer ---------- */
.composer { margin: 44px 0 10px; border: 3px solid var(--encre); background: #fff; padding: 28px; }
.composer[hidden] { display: none; }
.composer h3 {
  font-family: Anton, Impact, sans-serif; font-weight: 400; text-transform: lowercase;
  font-size: 30px; margin: 0 0 20px;
}
.composer h3 em { font-style: normal; color: var(--rouge); }
.champs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.champ { display: flex; flex-direction: column; gap: 6px; }
.champ.large { grid-column: 1 / -1; }
.champ label { font-weight: 600; font-size: 14px; }
.champ input, .champ textarea {
  font: inherit; padding: 11px 13px;
  border: 2px solid var(--encre); border-radius: 0; background: var(--papier);
}
.champ textarea { resize: vertical; min-height: 88px; }
.champ.ici { flex-direction: row; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.champ.ici .note { margin: 0; flex: 1 1 260px; }

.resultat { margin-top: 24px; padding-top: 22px; border-top: 3px solid var(--encre); }
.resultat[hidden] { display: none; }
.lien-boite { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.lien-boite input {
  flex: 1 1 320px; font: inherit; font-size: 15px; padding: 12px 13px;
  border: 2px solid var(--encre); border-radius: 0; background: var(--papier);
}
.note { font-size: 14px; color: var(--gris); margin: 12px 0 0; max-width: 60ch; }

/* ---------- sections ---------- */
.section { padding: 54px 0; border-top: 3px solid var(--encre); margin-top: 54px; }
.section h2 {
  font-family: Anton, Impact, sans-serif; font-weight: 400; text-transform: lowercase;
  font-size: clamp(30px, 4.6vw, 46px); margin: 0 0 8px;
}
.section .aide { margin: 0 0 24px; max-width: 52ch; }
.carte-monde { width: 100%; height: auto; display: block; border: 3px solid var(--encre); margin-top: 22px; }

.pied {
  position: relative; border-top: 3px solid var(--encre); margin-top: 54px;
  padding: 26px 0 104px; font-size: 14px; color: var(--gris);
}
.pied p { margin: 4px 0; }
.pied .approuve {
  position: absolute; right: 4px; bottom: 14px;
  width: clamp(118px, 17vw, 178px); transform: rotate(4deg); opacity: .8;
}

/* ---------- page bisou ---------- */
.recu { text-align: center; padding: 48px 0 20px; }
.recu .qui {
  font-family: Anton, Impact, sans-serif; font-weight: 400;
  font-size: clamp(34px, 6.4vw, 62px); line-height: .92; letter-spacing: -.005em;
  margin: 0 auto 30px; max-width: 16ch;
}
.recu .qui em { font-style: normal; color: var(--rouge); }
.recu .dessin-grand {
  max-width: min(340px, 64vw); max-height: 46vh; width: auto; height: auto;
  mix-blend-mode: multiply;
  animation: arrivee .5s cubic-bezier(.2,1.2,.4,1) both;
}
@keyframes arrivee { from { opacity: 0; transform: translateY(18px) rotate(-4deg); } to { opacity: 1; transform: none; } }
.mot {
  max-width: 40ch; margin: 30px auto 0; padding: 24px 28px;
  background: #fff; border: 3px solid var(--encre);
  font-size: 19px; text-align: left;
}
.mot .signature { display: block; margin-top: 14px; font-weight: 600; text-align: right; }
.rendre { margin: 34px 0 0; }

/* ---------- carte ---------- */
.carte-cadre { position: relative; margin-top: 26px; border: 3px solid var(--encre); background: #7ea6cd; overflow: hidden; }
.carte-cadre img { display: block; width: 100%; height: auto; }
.carte-cadre svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pastille { fill: var(--rouge); fill-opacity: .6; stroke: var(--papier); stroke-width: .3; cursor: pointer; transition: fill-opacity .12s ease; }
.pastille:hover, .pastille:focus, .pastille.active { fill-opacity: .95; outline: none; }
.vivant { fill: var(--encre); fill-opacity: .85; stroke: var(--papier); stroke-width: .4; cursor: pointer; }
.vivant:hover, .vivant:focus { fill-opacity: 1; outline: none; }

.bulle {
  position: absolute; z-index: 3; background: var(--encre); color: var(--papier);
  padding: 9px 13px; font-size: 14px; line-height: 1.35; white-space: nowrap;
  pointer-events: none; transform: translate(-50%, -140%); opacity: 0; transition: opacity .12s ease;
}
.bulle.visible { opacity: 1; }
.bulle b { font-family: Anton, Impact, sans-serif; font-weight: 400; text-transform: lowercase; font-size: 17px; }
.bulle span { display: block; color: #cdc4b4; font-size: 13px; }

.legende { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 18px; font-size: 14px; }
.legende span { display: flex; align-items: center; gap: 9px; }
.legende i { width: 13px; height: 13px; border-radius: 50%; display: block; }
.legende .i-2009 { background: var(--rouge); }
.legende .i-2026 { background: var(--encre); }

.chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 22px; margin-top: 34px; }
.chiffre { border-top: 3px solid var(--encre); padding-top: 12px; }
.chiffre .nb {
  display: block; font-family: Anton, Impact, sans-serif; font-weight: 400;
  font-size: clamp(34px, 5vw, 52px); line-height: .95;
}
.chiffre .quoi { display: block; margin-top: 8px; max-width: 26ch; }

.classement { margin-top: 40px; }
.classement table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.classement th { text-align: left; font-size: 13px; font-weight: 600; color: var(--gris); padding: 0 12px 8px 0; border-bottom: 3px solid var(--encre); }
.classement th:last-child, .classement td:last-child { text-align: right; padding-right: 0; white-space: nowrap; }
.classement td:first-child { white-space: nowrap; }
.classement td { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--trait); }
.classement .jauge { width: 100%; }
.classement .jauge span { display: block; height: 10px; background: var(--rouge); }

.avertissement { margin-top: 26px; border-left: 5px solid var(--rouge); padding: 4px 0 4px 16px; max-width: 62ch; }

/* ---------- carte animée de la home ---------- */
.carte-vivante { position: relative; display: block; margin-top: 22px; border: 3px solid var(--encre); }
.carte-vivante img { display: block; width: 100%; height: auto; }
.carte-vivante svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.pop { fill: var(--rouge); stroke: var(--papier); stroke-width: .4; transform-box: fill-box; transform-origin: center; animation: pop 5s ease-out forwards; }
@keyframes pop {
  0%   { opacity: 0; transform: scale(0); }
  14%  { opacity: 1; transform: scale(1.45); }
  26%  { transform: scale(1); }
  70%  { opacity: .85; }
  100% { opacity: 0; transform: scale(1); }
}

/* ---------- musée 2009 ---------- */
.chapo { font-size: clamp(19px, 2.4vw, 24px); max-width: 40ch; margin: 0 0 28px; }
.paires { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 26px; list-style: none; padding: 0; margin: 26px 0 0; }
.paire { border: 3px solid var(--encre); background: #fff; padding: 16px; }
.paire img { display: block; width: 100%; height: auto; }
.paire img + img { margin-top: 10px; }
.paire figcaption { font-size: 14px; margin-top: 10px; color: var(--gris); }
.templates { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 24px; }
.templates figure { margin: 0; }
.templates img { width: 100%; height: auto; border: 3px solid var(--encre); display: block; }
.templates figcaption { font-size: 14px; margin-top: 8px; }
.teaser { border: 3px solid var(--encre); background: #fff; padding: 20px; margin-top: 24px; }
.teaser img { width: 100%; max-width: 560px; height: auto; display: block; }
.deux-colonnes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; align-items: start; margin-top: 24px; }
.deux-colonnes img { width: 100%; height: auto; border: 3px solid var(--encre); display: block; }

@media (max-width: 900px) {
  .rond { width: 300px; height: 300px; right: -110px; top: -20px; }
  .hero .illustration { position: static; width: 220px; margin-top: 24px; display: block; }
  .tampon { top: auto; bottom: 10px; right: 10px; }
}
@media (max-width: 620px) {
  .champs { grid-template-columns: 1fr; }
  .composer { padding: 20px; }
  .pied { padding-bottom: 150px; }
  .pied .approuve { right: 50%; transform: translateX(50%) rotate(4deg); bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .pop { animation: none; opacity: .8; }
}
