/* ==========================================================================
   kaviz.fr — Kaviz Studio
   Identité du studio : bleu outremer, encre, jaune soleil. Chaque application
   apporte ses propres couleurs dans sa carte (--app-bg, --app-accent).
   Aucune ressource tierce : polices embarquées (SIL OFL), pas de CDN, pas de JS.
   ========================================================================== */

@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("fonts/instrument-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --blue: #26356F;
  --blue-deep: #18224C;
  --ink: #12123A;
  --paper: #FFFFFF;
  --mist: #EEF0FC;
  --sun: #FFD43B;
  --coral: #FF5C72;
  --mint: #25D0A0;

  --bg: var(--paper);
  --band: var(--mist);
  --card: #FFFFFF;
  --text: var(--ink);
  --muted: #55577A;
  --link: var(--blue);
  --border: rgba(18, 18, 58, 0.14);
  --danger: #B3261E;
  --danger-bg: #FDECEA;

  --display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: 20px;
  --r-lg: 36px;
  --r-md: 20px;
  --r-sm: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0D0D29;
    --band: #151640;
    --card: #1B1C4D;
    --text: #ECEDFB;
    --muted: #A9ABD0;
    --link: #A4A9FF;
    --border: rgba(236, 237, 251, 0.16);
    --danger: #FFA398;
    --danger-bg: #3A1B1E;
  }
}

/* --- Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2.5px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 7.2vw, 5.2rem); font-weight: 800; letter-spacing: -0.035em; line-height: 0.98; }
h2 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
h3 { font-size: 1.3rem; line-height: 1.2; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 650; }
code { font-size: 0.9em; background: var(--band); padding: 0.1em 0.35em; border-radius: 6px; overflow-wrap: anywhere; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; box-shadow: 0 0 0 6px var(--ink); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--sun); color: var(--ink); padding: 0.5rem 1rem; border-radius: 999px; z-index: 100; font-weight: 600; }
.skip-link:focus { left: var(--gutter); }

.container { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 32px; } }

/* --- En-tête ------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--blue); color: #fff; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; min-height: 64px; flex-wrap: wrap; padding-block: 0.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--display); font-weight: 800; font-size: 1.4rem; letter-spacing: -0.03em; color: #fff; text-decoration: none; }
.brand .mark { width: 30px; height: 30px; border-radius: 9px; background: var(--sun); position: relative; flex: none; }
.brand .mark::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--blue); }
.brand small { font-size: 1em; font-weight: 400; opacity: 0.85; }
.nav-links { display: flex; gap: 0.25rem 1.5rem; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; font-size: 0.98rem; }
.nav-links a { color: #fff; text-decoration: none; font-weight: 550; padding: 0.35rem 0; }
.nav-links a:hover, .nav-links a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* --- Boutons ------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.8rem 1.5rem; border-radius: 999px; font: inherit; font-weight: 650; text-decoration: none; border: 2px solid transparent; }
.btn-sun { background: var(--sun); color: var(--ink); }
.btn-sun:hover { background: #FFE072; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--blue-deep); }
.btn-line { color: inherit; border-color: currentColor; }
.btn-line:hover { background: rgba(127, 127, 160, 0.14); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* --- Hero du studio ------------------------------------------------------ */
.hero { background: var(--blue); color: #fff; position: relative; overflow: hidden; }
.hero .container { display: grid; gap: 2.5rem; padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(3rem, 8vw, 6.5rem); align-items: center; }
.hero h1 { max-width: 11ch; }
.hero .lead { font-size: clamp(1.1rem, 2vw, 1.3rem); max-width: 34ch; opacity: 0.95; }
@media (min-width: 900px) { .hero .container { grid-template-columns: 1.1fr 0.9fr; } }

/* Écran d'accueil : la grille d'icônes est la signature du studio */
.shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 2vw, 22px); width: min(100%, 440px); justify-self: center; transform: rotate(-7deg); }
@media (min-width: 900px) { .shelf { justify-self: end; margin-right: -24px; } }
.tile { aspect-ratio: 1; border-radius: 28%; position: relative; overflow: hidden; box-shadow: 0 10px 0 rgba(10, 14, 45, 0.4); animation: pop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both; animation-delay: calc(var(--i) * 55ms); }
.tile::before, .tile::after { content: ""; position: absolute; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.t-sun { background: var(--sun); } .t-sun::before { inset: 24%; border-radius: 50%; background: var(--coral); }
.t-app { background: #FFF8F0; }
.t-mint { background: var(--mint); } .t-mint::before { width: 70%; height: 70%; left: 0; bottom: 0; border-radius: 0 100% 0 0; background: var(--ink); }
.t-k { background: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: clamp(2.4rem, 7vw, 4.4rem); color: var(--blue); letter-spacing: -0.05em; }
.t-coral { background: var(--coral); } .t-coral::before { left: 18%; right: 18%; top: 50%; bottom: 18%; border-radius: 0 0 999px 999px; background: var(--sun); }
.t-ink { background: var(--ink); } .t-ink::before { inset: 22%; border-radius: 50%; border: clamp(8px, 1.6vw, 14px) solid #fff; }
.t-mist { background: #C9CEFF; } .t-mist::before { inset: 26%; background: radial-gradient(circle, var(--blue) 34%, transparent 36%) 0 0 / 33.4% 33.4%; }
.t-deep { background: var(--blue-deep); } .t-deep::before { inset: 27%; background: var(--mint); transform: rotate(45deg); border-radius: 12%; }
.t-plus { background: #fff; } .t-plus::before { left: 43%; right: 43%; top: 24%; bottom: 24%; background: var(--coral); border-radius: 99px; } .t-plus::after { top: 43%; bottom: 43%; left: 24%; right: 24%; background: var(--coral); border-radius: 99px; }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* --- Sections ------------------------------------------------------------ */
.section { padding-block: clamp(3rem, 8vw, 6rem); }
.section-band { background: var(--band); }
.section-head { max-width: 46ch; margin-bottom: clamp(1.5rem, 4vw, 3rem); }
.section-head p { font-size: 1.15rem; color: var(--muted); }

/* Carte d'application : les couleurs viennent de l'application */
.app-feature {
  --app-bg: #FFF1D6; --app-ink: #3D2614; --app-accent: #F4A261;
  background: var(--app-bg); color: var(--app-ink);
  border-radius: var(--r-lg); overflow: hidden; position: relative;
  display: grid; gap: 0;
}
.app-feature .copy { padding: clamp(1.75rem, 5vw, 3.5rem); align-self: center; }
.app-feature .id { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.app-feature .id img { width: 72px; height: 72px; border-radius: 28%; background: #FFF8F0; box-shadow: 0 6px 0 rgba(61, 38, 20, 0.16); }
.app-feature .id h3 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0; font-weight: 800; }
.app-feature .id p { margin: 0; font-weight: 550; opacity: 0.8; }
.app-feature .pitch { font-size: 1.15rem; max-width: 40ch; }
.app-feature .legal-links a { color: inherit; }
.status { display: inline-block; font-size: 0.92rem; font-weight: 650; padding: 0.3rem 0.85rem; border-radius: 999px; background: var(--app-ink); color: var(--app-bg); margin-top: 0.5rem; }
.app-feature .visual { position: relative; min-height: 320px; max-height: 440px; display: flex; justify-content: center; align-items: flex-start; padding: 2.5rem 1.5rem 0; }
.app-feature .visual::before { content: ""; position: absolute; width: 440px; height: 440px; border-radius: 50%; background: var(--app-accent); left: 50%; top: 14%; transform: translateX(-50%); }
.phone { position: relative; width: min(270px, 70vw); border-radius: 34px 34px 0 0; border: 9px solid var(--ink); border-bottom: 0; overflow: hidden; background: var(--ink); margin-bottom: -1px; }
.phone img { width: 100%; }
@media (min-width: 860px) {
  .app-feature { grid-template-columns: 1.15fr 0.85fr; }
  .app-feature .visual { padding-top: 3.5rem; max-height: 520px; }
}
.legal-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; margin-top: 1.25rem; font-size: 0.98rem; font-weight: 550; }
.next-apps { margin-top: 2rem; font-size: 1.1rem; color: var(--muted); max-width: 52ch; }

/* Principes */
.principles { display: grid; gap: 2rem 3rem; }
@media (min-width: 800px) { .principles { grid-template-columns: repeat(3, 1fr); } }
.principles h3 { font-size: 1.55rem; }
.principles p { color: var(--muted); }
.principles > div { border-top: 4px solid var(--text); padding-top: 1.1rem; }

/* Contact */
.contact { background: var(--sun); color: var(--ink); }
.contact h2 { max-width: 16ch; }
.contact p { font-size: 1.15rem; max-width: 44ch; }
.contact .mail { font-family: var(--display); font-weight: 800; font-size: clamp(1.6rem, 5.4vw, 3.4rem); letter-spacing: -0.03em; color: var(--ink); display: inline-block; margin-top: 1rem; overflow-wrap: anywhere; }

/* --- Page produit -------------------------------------------------------- */
.product-hero { --app-bg: #FFF1D6; --app-ink: #3D2614; --app-accent: #F4A261; background: var(--app-bg); color: var(--app-ink); overflow: hidden; }
.product-hero .container { display: grid; gap: 2rem; padding-top: clamp(2rem, 6vw, 4.5rem); align-items: end; }
.product-hero .copy { padding-bottom: clamp(2rem, 6vw, 4.5rem); }
.product-hero h1 { font-size: clamp(2.3rem, 6vw, 4.2rem); max-width: 13ch; }
.product-hero .lead { font-size: 1.2rem; max-width: 42ch; }
.product-hero .id { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.5rem; font-family: var(--display); font-weight: 800; font-size: 1.5rem; }
.product-hero .id img { width: 60px; height: 60px; border-radius: 28%; background: #FFF8F0; box-shadow: 0 5px 0 rgba(61, 38, 20, 0.16); }
.product-hero .visual { position: relative; display: flex; justify-content: center; align-items: flex-start; gap: 1.25rem; max-height: 460px; }
.product-hero .visual::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: var(--app-accent); left: 50%; top: 8%; transform: translateX(-50%); }
.product-hero .phone { width: min(230px, 42vw); }
.product-hero .phone + .phone { margin-top: 3.5rem; }
@media (min-width: 900px) { .product-hero .container { grid-template-columns: 1fr 1fr; } }

.features { display: grid; gap: 2rem 3rem; }
@media (min-width: 720px) { .features { grid-template-columns: repeat(2, 1fr); } }
.features h3 { margin-bottom: 0.35rem; }
.features p { color: var(--muted); }

.split { display: grid; gap: 2rem 4rem; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; } }
.split ul { padding-left: 1.2rem; margin: 0; }
.split li { margin-bottom: 0.5rem; }
.doc-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.75rem; }
.doc-list li { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 1rem 1.25rem; }
.doc-list strong { display: block; font-family: var(--display); font-size: 1.15rem; margin-bottom: 0.2rem; }
.doc-list a { margin-right: 1rem; white-space: nowrap; }
.disclaimer { margin-top: 2.5rem; padding: 1rem 1.25rem; border-left: 4px solid var(--coral); background: var(--card); border-radius: 0 var(--r-sm) var(--r-sm) 0; max-width: 70ch; }

/* --- Pied de page -------------------------------------------------------- */
.site-footer { background: var(--ink); color: #D5D7F2; padding-block: 2.5rem; font-size: 0.98rem; }
.site-footer a { color: #fff; }
.footer-row { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; }
.lang-switch { list-style: none; padding: 0; margin: 0; display: flex; gap: 0.4rem; }
.lang-switch a, .lang-switch span { display: inline-block; min-width: 2.7rem; text-align: center; padding: 0.2rem 0.6rem; border: 1.5px solid rgba(255, 255, 255, 0.4); border-radius: 999px; font-size: 0.88rem; font-weight: 650; text-decoration: none; }
.lang-switch span { background: var(--sun); color: var(--ink); border-color: var(--sun); }
.copyright { margin-top: 1.5rem; font-size: 0.9rem; opacity: 0.75; }

/* --- Pages documentaires (mentions légales, CGU, confidentialité) -------- */
.doc-head { background: var(--blue); color: #fff; padding-block: clamp(2rem, 5vw, 3.5rem); }
.doc-head h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); max-width: 18ch; margin: 0.4rem 0 0; }
.doc-head .back { color: #fff; font-weight: 550; }
.doc-head .app { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 650; margin-top: 1.25rem; }
.doc-head .app img { width: 36px; height: 36px; border-radius: 28%; background: #FFF8F0; }
.doc { max-width: 760px; margin-inline: auto; padding-block: clamp(1.75rem, 5vw, 3rem) clamp(2.5rem, 6vw, 4rem); }
.doc h2 { font-size: 1.6rem; margin-top: 2.75rem; letter-spacing: -0.015em; }
.doc h3 { font-size: 1.2rem; margin-top: 1.75rem; }
.doc .updated { color: var(--muted); font-size: 0.98rem; margin-bottom: 1.5rem; }
.doc ul, .doc ol { padding-left: 1.3rem; }
.doc li { margin-bottom: 0.4rem; }
.doc dl { margin: 0; display: grid; gap: 0.15rem 1.5rem; }
.doc dt { font-weight: 650; margin-top: 0.75rem; }
.doc dd { margin: 0; }
@media (min-width: 640px) { .doc dl { grid-template-columns: 13.5rem 1fr; } .doc dt, .doc dd { margin-top: 0; padding-block: 0.55rem; border-bottom: 1px solid var(--border); } }

.doc.legal h2 { font-size: 1.3rem; margin-top: 2.25rem; }
.doc.legal p, .doc.legal li { text-align: justify; hyphens: auto; }
.doc .fine { font-size: 0.85rem; line-height: 1.5; color: var(--muted); }

.summary-box { background: var(--band); border-radius: var(--r-md); padding: 1.4rem 1.6rem; margin: 0 0 2rem; }
.summary-box h2 { margin-top: 0; font-size: 1.3rem; }
.summary-box ul { margin: 0.5rem 0 0; }

.essential { border: 3px solid var(--blue); background: var(--card); border-radius: var(--r-md); padding: 1.5rem 1.6rem; margin: 2rem 0; }
.essential h2 { margin-top: 0; }
.essential ul { margin: 0.75rem 0 0; font-size: 1.08rem; }
.essential li { margin-bottom: 0.7rem; }

.medical { border: 3px solid var(--danger); background: var(--danger-bg); border-radius: var(--r-md); padding: 1.5rem 1.6rem; margin: 2.5rem 0; }
.medical h2 { margin-top: 0; color: var(--danger); }
.medical .big { font-size: 1.25rem; font-weight: 700; line-height: 1.4; }
.medical .emergency { margin-top: 1.25rem; padding: 1rem 1.2rem; border-radius: var(--r-sm); background: var(--card); border: 2px solid var(--danger); font-size: 1.1rem; font-weight: 700; }

.toc { border: 1px solid var(--border); border-radius: var(--r-md); padding: 1.1rem 1.4rem; margin: 1.5rem 0 2rem; }
.toc ol { margin: 0.5rem 0 0; padding-left: 1.25rem; columns: 2; column-gap: 2rem; font-size: 0.98rem; }
.toc li { break-inside: avoid; }
@media (max-width: 600px) { .toc ol { columns: 1; } }

.table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; }
.doc table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.doc th, .doc td { text-align: left; padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.doc th { font-weight: 650; background: var(--band); }
.doc td:first-child { overflow-wrap: anywhere; }
.doc .note { border-left: 4px solid var(--blue); background: var(--band); padding: 0.9rem 1.1rem; border-radius: 0 var(--r-sm) var(--r-sm) 0; margin: 1.25rem 0; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .tile { animation: none; } }
@media print {
  .site-header, .site-footer, .skip-link { display: none; }
  .doc-head { background: none; color: #000; padding: 0; }
  body { background: #fff; color: #000; font-size: 11pt; }
  a { color: #000; }
}
