/* ==========================================================================
   DON'T TAP — Feuille de styles du site officiel
   Style pop / néo-brutaliste : contours épais, ombres franches.
   ========================================================================== */

/* Lilita One — SIL Open Font License 1.1 (voir assets/fonts/OFL-LilitaOne.txt).
   Auto-hébergée : aucune requête vers un service tiers. */
@font-face {
  font-family: "Lilita One";
  src: url("/assets/fonts/LilitaOne-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --blue: #3A86FF;
  --red: #FF4757;
  --yellow: #FFD23F;
  --green: #2ED573;
  --violet: #8338EC;
  --cream: #FFF4E0;
  --ink: #1B1B2F;
  --white: #FFFFFF;

  --border: 4px solid var(--ink);
  --border-thin: 3px solid var(--ink);
  --shadow: 6px 6px 0 var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);
  --radius: 14px;

  --font-title: "Lilita One", "Arial Black", "Trebuchet MS", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --maxw: 1100px;
  --gutter: clamp(16px, 4vw, 32px);

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}

main {
  flex: 1 0 auto;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--font-title);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 7vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.6rem); }

p {
  margin: 0 0 1em;
}

a {
  color: var(--ink);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 3px;
  background-color: var(--yellow);
}

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Lien d'évitement (accessibilité clavier) */
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 0.6em 1em;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
  border: var(--border-thin);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

/* --------------------------------------------------------------------------
   En-tête et navigation
   -------------------------------------------------------------------------- */
.site-header {
  background: var(--white);
  border-bottom: var(--border);
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-title);
  font-size: 1.6rem;
  text-decoration: none;
  color: var(--ink);
}

.brand:hover {
  background: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex: none;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding: 0.35em 0.9em;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: var(--border-thin);
  border-radius: 999px;
  background: var(--cream);
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.site-nav a:hover {
  background: var(--yellow);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}

.site-nav a[aria-current="page"] {
  background: var(--blue);
}

/* --------------------------------------------------------------------------
   Composants
   -------------------------------------------------------------------------- */
.card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(20px, 3vw, 32px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.45em 1em;
  font-family: var(--font-title);
  font-size: 1.15rem;
  line-height: 1.2;
  border: var(--border-thin);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.badge--green { background: var(--green); }
.badge--yellow { background: var(--yellow); }

.badge-dot {
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  background: var(--ink);
  flex: none;
}

.section {
  padding: clamp(48px, 8vw, 88px) 0;
}

.section--bordered {
  border-top: var(--border);
}

.section-title {
  text-align: center;
  margin-bottom: 0.25em;
}

.section-lead {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.5em;
  font-size: 1.15rem;
}

/* --------------------------------------------------------------------------
   Accueil — héros
   -------------------------------------------------------------------------- */
.hero {
  padding: clamp(40px, 8vw, 96px) 0 clamp(48px, 8vw, 96px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

.hero-title {
  font-size: clamp(3.4rem, 12vw, 7rem);
  line-height: 0.95;
  margin-bottom: 0.25em;
  color: var(--red);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 6px 6px 0 var(--ink);
}

.hero-slogan {
  font-family: var(--font-title);
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  line-height: 1.2;
  margin-bottom: 0.8em;
}

.hero-text {
  font-size: 1.15rem;
  max-width: 34em;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 1.6em;
}

/* Illustration de téléphone (décorative) */
.phone {
  position: relative;
  width: min(300px, 80%);
  margin: 0 auto;
  aspect-ratio: 9 / 17;
  background: var(--blue);
  border: 5px solid var(--ink);
  border-radius: 36px;
  box-shadow: 10px 10px 0 var(--ink);
  transform: rotate(3deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18%;
  padding: 12% 10%;
}

.phone::before {
  content: "";
  position: absolute;
  top: 4.5%;
  left: 50%;
  width: 28%;
  height: 3.2%;
  transform: translateX(-50%);
  background: var(--ink);
  border-radius: 999px;
}

.phone-label {
  font-family: var(--font-title);
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  text-align: center;
  line-height: 1.15;
  background: var(--white);
  border: var(--border-thin);
  border-radius: 12px;
  padding: 0.4em 0.8em;
  box-shadow: var(--shadow-sm);
}

.phone-button {
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--red);
  border: 5px solid var(--ink);
  box-shadow: 0 9px 0 var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: clamp(1rem, 2.6vw, 1.35rem);
  color: var(--ink);
  text-align: center;
  line-height: 1.05;
}

.phone-sticker {
  position: absolute;
  right: -14%;
  bottom: 10%;
  transform: rotate(-12deg);
  background: var(--yellow);
  border: var(--border-thin);
  border-radius: 10px;
  padding: 0.3em 0.7em;
  font-family: var(--font-title);
  font-size: clamp(0.95rem, 2.4vw, 1.15rem);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Accueil — concept
   -------------------------------------------------------------------------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 32px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature {
  position: relative;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 14px;
  border: var(--border-thin);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.feature-icon svg {
  width: 36px;
  height: 36px;
}

.feature--blue .feature-icon { background: var(--blue); }
.feature--red .feature-icon { background: var(--red); }
.feature--yellow .feature-icon { background: var(--yellow); }

.feature p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Accueil — 50 niveaux
   -------------------------------------------------------------------------- */
.levels {
  background: var(--violet);
  color: var(--white);
  border-top: var(--border);
  border-bottom: var(--border);
}

.levels a {
  color: var(--white);
}

.levels-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
}

.levels-number {
  font-family: var(--font-title);
  font-size: clamp(7rem, 22vw, 13rem);
  line-height: 0.85;
  color: var(--yellow);
  -webkit-text-stroke: 4px var(--ink);
  paint-order: stroke fill;
  text-shadow: 8px 8px 0 var(--ink);
}

.levels h2 {
  color: var(--white);
}

.levels-list {
  margin: 1.2em 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.levels-list li {
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.levels-list li::before {
  content: "✕";
  font-weight: 900;
  color: var(--yellow);
  flex: none;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
  margin-top: clamp(32px, 5vw, 48px);
}

.tiles span {
  aspect-ratio: 1;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--white);
}

.tiles span:nth-child(5n + 1) { background: var(--blue); }
.tiles span:nth-child(7n + 2) { background: var(--red); }
.tiles span:nth-child(4n + 3) { background: var(--yellow); }
.tiles span:nth-child(9n + 4) { background: var(--green); }

/* --------------------------------------------------------------------------
   Accueil — bientôt disponible
   -------------------------------------------------------------------------- */
.soon {
  text-align: center;
}

.soon .card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--green);
}

.soon .card p {
  font-size: 1.12rem;
}

.soon .card p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Pages de contenu (confidentialité, contact)
   -------------------------------------------------------------------------- */
.page-hero {
  padding: clamp(36px, 6vw, 64px) 0 clamp(20px, 3vw, 32px);
}

.page-hero h1 {
  margin-bottom: 0.3em;
}

.page-hero .lead {
  font-size: 1.15rem;
  max-width: 44em;
}

.prose {
  max-width: 820px;
}

.prose h2 {
  font-size: clamp(1.5rem, 3.6vw, 2rem);
  margin-top: 1.8em;
  padding-top: 0.2em;
}

.prose h3 {
  font-size: clamp(1.2rem, 2.6vw, 1.4rem);
  margin-top: 1.4em;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
  margin: 0 0 1.2em;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.4em;
  background: var(--white);
  border: var(--border-thin);
  font-size: 0.98rem;
}

.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 0.7em 0.85em;
  border: 2px solid var(--ink);
}

.prose th {
  background: var(--yellow);
}

.table-wrap {
  overflow-x: auto;
  margin-bottom: 1.4em;
}

.table-wrap table {
  margin-bottom: 0;
  min-width: 560px;
}

.toc {
  margin: 0 0 2em;
}

.toc h2 {
  font-size: 1.4rem;
  margin: 0 0 0.6em;
  padding: 0;
}

.toc ol {
  margin: 0;
  columns: 2 260px;
  column-gap: 32px;
}

.toc li {
  break-inside: avoid;
}

.meta-date {
  display: inline-block;
  font-weight: 700;
  background: var(--white);
  border: var(--border-thin);
  border-radius: 10px;
  padding: 0.25em 0.7em;
  box-shadow: 3px 3px 0 var(--ink);
}

/* Encadrés */
.notice {
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1em 1.2em;
  margin: 0 0 1.6em;
}

.notice > :last-child {
  margin-bottom: 0;
}

.notice--draft {
  background: var(--yellow);
}

.notice--info {
  background: var(--white);
}

.notice-title {
  font-family: var(--font-title);
  font-size: 1.25rem;
  margin: 0 0 0.3em;
}

/* Éléments à compléter avant publication */
.todo {
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
  padding: 0.05em 0.35em;
  border: 2px dashed var(--ink);
  border-radius: 4px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(20px, 3vw, 32px);
  align-items: start;
}

.contact-card {
  background: var(--blue);
}

.contact-email {
  font-family: var(--font-title);
  font-size: clamp(1.2rem, 3.5vw, 1.6rem);
  line-height: 1.3;
  overflow-wrap: anywhere;
  margin: 0.4em 0 0.8em;
}

.contact-card .todo {
  font-family: var(--font-body);
  font-size: 1rem;
}

.checklist {
  padding-left: 0;
  list-style: none;
  margin: 0;
}

.checklist li {
  position: relative;
  padding-left: 1.8em;
  margin-bottom: 0.55em;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 1em;
  height: 1em;
  background: var(--green);
  border: 2px solid var(--ink);
  border-radius: 4px;
}

.faq {
  margin-top: clamp(40px, 6vw, 64px);
}

.faq details {
  background: var(--white);
  border: var(--border-thin);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}

.faq summary {
  cursor: pointer;
  padding: 0.9em 1.1em;
  font-weight: 700;
  list-style-position: inside;
}

.faq summary:hover {
  background: var(--cream);
  border-radius: 12px;
}

.faq details[open] summary {
  border-bottom: 2px solid var(--ink);
}

.faq .answer {
  padding: 0.9em 1.1em 0.3em;
}

/* 404 */
.not-found {
  text-align: center;
  padding: clamp(56px, 10vw, 120px) 0;
}

.not-found .hero-title {
  font-size: clamp(4.5rem, 18vw, 9rem);
}

.not-found p {
  font-size: 1.15rem;
}

.button-link {
  display: inline-block;
  margin-top: 0.8em;
  padding: 0.6em 1.3em;
  font-family: var(--font-title);
  font-size: 1.2rem;
  text-decoration: none;
  background: var(--yellow);
  border: var(--border-thin);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.button-link:hover {
  background: var(--yellow);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

/* --------------------------------------------------------------------------
   Pied de page
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  border-top: var(--border);
  padding: 32px 0;
  font-size: 0.95rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
}

.site-footer a {
  color: var(--cream);
}

.site-footer a:hover {
  color: var(--ink);
  background: var(--yellow);
}

.site-footer :focus-visible {
  outline-color: var(--yellow);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer p {
  margin: 0;
}

.footer-note {
  flex-basis: 100%;
  opacity: 0.85;
  font-size: 0.88rem;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .hero-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }

  .phone {
    width: min(220px, 62%);
  }

  .features {
    grid-template-columns: 1fr;
  }

  .levels-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .levels-list {
    text-align: left;
    max-width: 30em;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 1rem;
  }

  .brand {
    font-size: 1.35rem;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .site-nav a {
    font-size: 0.9rem;
    padding: 0.3em 0.75em;
  }

  .hero-title {
    -webkit-text-stroke-width: 2px;
    text-shadow: 4px 4px 0 var(--ink);
  }

  .phone-sticker {
    right: -8%;
  }

  .tiles {
    gap: 4px;
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .skip-link {
    display: none;
  }

  body {
    background: #fff;
  }

  .card,
  .notice {
    box-shadow: none;
  }
}
