/* ==========================================================================
   COURT — raccourcisseur Kaury Studio
   Reprend le systeme du site : palette, typographies, pilules, rayon 24px.
   ========================================================================== */

@font-face {
  font-family: 'Cabinet Grotesk';
  src: url('fonts/cabinet-grotesk-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Cabinet Grotesk';
  src: url('fonts/cabinet-grotesk-800.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('fonts/satoshi-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('fonts/satoshi-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --beige: #f1e8cb;
  --beige-2: #e9ddb9;
  --noir: #1c1a1a;
  --orange: #f56e2e;
  --orange-texte: #a83e0d;
  --vert: #3d5c3d;

  --encre: var(--noir);
  --encre-2: rgba(28, 26, 26, 0.72);
  --ligne: rgba(28, 26, 26, 0.16);
  --beige-sur-noir: rgba(241, 232, 203, 0.75);
  --ligne-claire: rgba(241, 232, 203, 0.2);

  --police-titre: 'Cabinet Grotesk', 'Arial Black', sans-serif;
  --police-texte: 'Satoshi', 'Helvetica Neue', sans-serif;

  --display-xl: clamp(2.8rem, 8.5vw, 7rem);
  --display-l: clamp(2.1rem, 5vw, 4rem);

  --rayon-media: 24px;
  --rayon-pilule: 999px;

  --largeur-max: 1180px;
  --gouttiere: clamp(1.25rem, 4vw, 3.5rem);

  --z-header: 40;
  --z-grain: 60;

  --sortie: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--beige);
  color: var(--encre);
  font-family: var(--police-texte);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  font-family: var(--police-titre);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
}

p {
  margin: 0 0 1rem;
}

a {
  color: inherit;
}

code {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
  font-size: 0.9em;
  background: rgba(28, 26, 26, 0.07);
  padding: 0.1em 0.4em;
  border-radius: 6px;
}

:focus-visible {
  outline: 3px solid var(--vert);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Grain artistique, fixe et sans cout au scroll */
.grain {
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.4;
  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='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.11 0 0 0 0 0.1 0 0 0 0 0.1 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Structure ---- */
.conteneur {
  max-width: var(--largeur-max);
  margin-inline: auto;
  padding-inline: var(--gouttiere);
}

.conteneur-etroit {
  max-width: 820px;
}

.section {
  padding-block: clamp(4rem, 8vw, 7.5rem);
}

.titre-section {
  font-size: var(--display-l);
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
  text-align: center;
}

.sur-titre {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange-texte);
  margin-bottom: 1.2rem;
}

.accent {
  color: var(--orange-texte);
}

.accent-italique {
  font-style: italic;
  color: var(--orange-texte);
  line-height: 1.1;
  padding-bottom: 0.05em;
}

/* ---- Boutons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 1.9rem;
  border-radius: var(--rayon-pilule);
  border: 2px solid var(--noir);
  font-family: var(--police-texte);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 0.3s var(--sortie),
    background-color 0.3s var(--sortie),
    color 0.3s var(--sortie);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: scale(0.98);
}

.btn-orange {
  background: var(--orange);
  color: var(--noir);
}

.btn-orange:hover {
  background: var(--noir);
  color: var(--beige);
}

.btn-contour {
  background: transparent;
  color: var(--noir);
}

.btn-contour:hover {
  background: var(--noir);
  color: var(--beige);
}

.sur-noir .btn-contour {
  border-color: var(--beige);
  color: var(--beige);
}

.sur-noir .btn-contour:hover {
  background: var(--beige);
  color: var(--noir);
}

.chip {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: var(--rayon-pilule);
  border: 1.5px solid var(--vert);
  color: var(--vert);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.4;
}

.sur-noir .chip {
  border-color: var(--beige-sur-noir);
  color: var(--beige-sur-noir);
}

/* ---- Header ---- */
.entete {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: color-mix(in srgb, var(--beige) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ligne);
}

.entete-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 2rem;
}

.entete-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--noir);
  flex: 0 0 auto;
}

/* Le wordmark est un SVG en currentColor : seule la hauteur est pilotee, la
   largeur suit le viewBox 728x233. */
.logo-kaury {
  display: block;
  height: 26px;
  width: auto;
}

@media (max-width: 480px) {
  .logo-kaury {
    height: 22px;
  }
}

.etat-logo {
  position: absolute;
  top: clamp(1.5rem, 4vw, 2.5rem);
  left: var(--gouttiere);
  color: var(--noir);
}

.entete-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2.2rem);
  font-weight: 700;
  font-size: 0.95rem;
}

.entete-nav a:not(.btn) {
  text-decoration: none;
  position: relative;
}

.entete-nav a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--noir);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--sortie);
}

.entete-nav a:not(.btn):hover::after {
  transform: scaleX(1);
}

.entete-nav .btn {
  padding: 0.7rem 1.35rem;
  font-size: 0.9rem;
}

/* Selecteur de langue : discret, mais toujours visible sur mobile, ou le
   reste de la navigation disparait. Sans cela on ne pourrait plus changer de
   langue depuis un telephone. */
.lien-langue {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  opacity: 0.7;
}

.lien-langue:hover {
  opacity: 1;
}

@media (max-width: 640px) {
  .entete-nav a:not(.btn):not(.lien-langue) {
    display: none;
  }
}

/* ---- Hero ---- */
.hero {
  padding-block: clamp(3.5rem, 8vw, 7rem) clamp(3rem, 6vw, 5rem);
  text-align: center;
}

.hero-titre {
  font-size: var(--display-xl);
  max-width: 15ch;
  margin: 0 auto 1.6rem;
}

.hero-phrase {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--encre-2);
  max-width: 48ch;
  margin: 0 auto clamp(2.2rem, 4vw, 3.2rem);
}

/* ---- Formulaire principal ---- */
.boite {
  background: var(--beige-2);
  border: 2px solid var(--noir);
  border-radius: var(--rayon-media);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  max-width: 760px;
  margin-inline: auto;
  box-shadow: 8px 8px 0 rgba(28, 26, 26, 0.9);
  text-align: left;
}

.etiquette {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--encre-2);
  margin-bottom: 0.7rem;
}

.rangee {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}

.rangee input {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--police-texte);
  font-size: 1.05rem;
  padding: 1rem 1.3rem;
  border: 2px solid var(--noir);
  border-radius: var(--rayon-pilule);
  background: var(--beige);
  color: var(--encre);
}

.rangee input::placeholder {
  color: rgba(28, 26, 26, 0.42);
}

.rangee .btn {
  flex: 0 0 auto;
}

@media (max-width: 620px) {
  .rangee {
    flex-direction: column;
  }

  .rangee .btn {
    width: 100%;
  }
}

.option {
  margin-top: 1.3rem;
  border-top: 1px solid var(--ligne);
  padding-top: 1.1rem;
}

.option summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.option summary::-webkit-details-marker {
  display: none;
}

.option summary::before {
  content: '+';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--noir);
  font-size: 0.95rem;
  line-height: 1;
}

.option[open] summary::before {
  content: '–';
}

.option-note {
  font-weight: 400;
  color: var(--encre-2);
}

.option-corps {
  padding-top: 1.2rem;
}

.prefixe {
  display: flex;
  align-items: center;
  gap: 0;
  border: 2px solid var(--noir);
  border-radius: var(--rayon-pilule);
  background: var(--beige);
  overflow: hidden;
}

.prefixe-hote {
  padding: 0.9rem 0.4rem 0.9rem 1.3rem;
  color: var(--encre-2);
  font-size: 0.98rem;
  white-space: nowrap;
}

.prefixe input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  font-family: var(--police-texte);
  font-size: 0.98rem;
  padding: 0.9rem 1.3rem 0.9rem 0;
  color: var(--encre);
}

.prefixe input:focus {
  outline: none;
}

.prefixe:focus-within {
  outline: 3px solid var(--vert);
  outline-offset: 3px;
}

.aide {
  font-size: 0.88rem;
  color: var(--encre-2);
  margin: 0.6rem 0 0;
}

/* Champ piege anti-robot : retire du flux sans display:none, que certains
   robots detectent et contournent. */
.piege {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- Retours ---- */
.alerte {
  max-width: 760px;
  margin-inline: auto;
  margin-top: 1.4rem;
  padding: 1rem 1.4rem;
  border: 2px solid var(--orange-texte);
  border-radius: var(--rayon-media);
  background: rgba(245, 110, 46, 0.12);
  color: var(--orange-texte);
  font-weight: 700;
}

.succes {
  max-width: 760px;
  margin-inline: auto;
  margin-top: 1.6rem;
  text-align: center;
  padding: clamp(1.3rem, 2.6vw, 1.9rem);
  border: 2px solid var(--noir);
  border-radius: var(--rayon-media);
  background: var(--noir);
  color: var(--beige);
}

.succes-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.8rem;
}

.succes-rangee {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.succes-lien {
  font-family: var(--police-titre);
  font-weight: 700;
  font-size: clamp(1.3rem, 3.4vw, 2rem);
  letter-spacing: -0.02em;
  color: var(--beige);
  text-decoration: none;
  word-break: break-all;
  border-bottom: 2px solid var(--orange);
}

.succes .btn {
  border-color: var(--beige);
  color: var(--beige);
  padding: 0.7rem 1.4rem;
  font-size: 0.9rem;
}

.succes .btn:hover {
  background: var(--beige);
  color: var(--noir);
}

.succes-cible {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--beige-sur-noir);
  word-break: break-all;
}

.succes-stats {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
}

.succes-stats a {
  color: var(--orange);
}

.compteur {
  margin: 1.1rem 0 0;
  font-size: 0.95rem;
  color: var(--beige-sur-noir);
}

.compteur strong {
  font-family: var(--police-titre);
  font-weight: 800;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  color: var(--beige);
  display: block;
  line-height: 1;
  margin-bottom: 0.2rem;
}

/* ---- Etapes ---- */
.etapes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.etapes li {
  border-top: 2px solid var(--noir);
  padding-top: 1.4rem;
  text-align: center;
}

.etape-num {
  font-family: var(--police-titre);
  font-weight: 800;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--orange-texte);
  display: block;
  margin-bottom: 0.8rem;
}

.etapes h3 {
  font-size: 1.4rem;
  margin-bottom: 0.7rem;
}

.etapes p {
  color: var(--encre-2);
  margin: 0;
}

/* ---- Section sombre ---- */
.sur-noir {
  background: var(--noir);
  color: var(--beige);
  border-radius: var(--rayon-media);
  margin-inline: var(--gouttiere);
}

.sur-noir .titre-section {
  color: var(--beige);
}

.grille {
  display: grid;
  gap: clamp(1.2rem, 2.4vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.carte {
  border: 1px solid var(--ligne-claire);
  border-radius: var(--rayon-media);
  padding: clamp(1.3rem, 2.4vw, 1.9rem);
  text-align: center;
}

.carte h3 {
  font-size: 1.3rem;
  margin: 1rem 0 0.7rem;
}

.carte p {
  color: var(--beige-sur-noir);
  margin: 0;
  font-size: 0.98rem;
}

/* ---- Questions ---- */
.qr {
  border-bottom: 1px solid var(--ligne);
  padding: 1.3rem 0;
}

.qr summary {
  cursor: pointer;
  font-family: var(--police-titre);
  font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  letter-spacing: -0.01em;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
}

.qr summary::-webkit-details-marker {
  display: none;
}

.qr summary::after {
  content: '+';
  flex: 0 0 auto;
  font-family: var(--police-texte);
  color: var(--orange-texte);
  font-size: 1.5rem;
  line-height: 1;
}

.qr[open] summary::after {
  content: '–';
}

.qr p {
  margin: 0.9rem 0 0;
  color: var(--encre-2);
  max-width: 68ch;
}

.recherche {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 2px solid var(--noir);
  text-align: center;
}

.recherche .rangee {
  max-width: 480px;
  margin-inline: auto;
  text-align: left;
}

/* ---- Signature ---- */
.signature {
  padding-bottom: clamp(4rem, 8vw, 7rem);
  text-align: center;
}

.signature-titre {
  font-size: clamp(1.7rem, 3.6vw, 2.8rem);
  margin-bottom: 1.5rem;
}

.signature-phrase {
  color: var(--encre-2);
  max-width: 60ch;
  margin: 0 auto 2rem;
}

.signature-liens {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin: 0;
}

/* ---- Pied ---- */
.pied {
  border-top: 1px solid var(--ligne);
  padding-block: 2.2rem;
  font-size: 0.9rem;
  color: var(--encre-2);
}

.pied-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  text-align: center;
}

.pied p {
  margin: 0;
}

/* ---- Pages d'etat (404 / 410) ---- */
.page-etat {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  text-align: center;
}

.etat-code {
  font-family: var(--police-titre);
  font-weight: 800;
  font-size: clamp(4rem, 16vw, 10rem);
  line-height: 1;
  color: var(--orange);
  margin: 0 0 0.5rem;
}

.etat-titre {
  font-size: var(--display-l);
  margin-bottom: 1rem;
}

.etat-phrase {
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
}

.etat-detail {
  color: var(--encre-2);
  margin-bottom: 2rem;
}

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

  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
