/* Tiwizi — site vitrine. Aucune police externe : piles système uniquement. */
:root {
  --green: #1c5043;
  --green-deep: #123a30;
  --green-soft: #e4ece7;
  --paper: #f6f2ea;
  --paper-deep: #ede6d8;
  --card: #fffdf8;
  --terracotta: #c2602f;      /* décoratif et grands éléments */
  --terracotta-ink: #a54e22;  /* texte et fonds de bouton (contraste AA) */
  --ink: #1f1d1a;
  --ink-soft: #4f4c44;
  --line: #d9d0bf;
  --on-dark: #f6f2ea;
  --on-dark-soft: #d7e3dc;
  --on-dark-accent: #f0b48c;
  --radius: 18px;
  --wrap: 1180px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Noto Serif", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--terracotta-ink); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }
h1, h2, h3 { font-family: var(--font-serif); line-height: 1.15; color: var(--green-deep); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 1.3rem + 3.2vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.7vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
@media (min-width: 720px) { .wrap { padding-inline: 32px; } }
.small { font-size: .9rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link { position: absolute; left: 12px; top: -100px; z-index: 100; background: var(--green-deep); color: var(--on-dark); padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.skip-link:focus { top: 12px; }

/* En-tête */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(246, 242, 234, .94); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; padding-block: 10px; }
.brand { display: inline-flex; align-items: center; border-radius: 8px; }
.brand img { height: 38px; width: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.site-nav a:hover { background: var(--paper-deep); }
.site-nav .nav-cta { background: var(--green); color: var(--on-dark); }
.site-nav .nav-cta:hover { background: var(--green-deep); }
@media (max-width: 819px) {
  .site-header { position: static; }
  html { scroll-padding-top: 12px; }
  .site-nav { width: 100%; }
  .site-nav ul { gap: 2px 4px; margin-inline: -10px; }
  .site-nav a { font-size: .92rem; padding: 0 10px; }
  .header-inner { padding-block: 10px 6px; gap: 2px; }
}

/* Boutons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 24px; border-radius: 999px; font-weight: 700; font-size: 1rem; text-decoration: none; border: 2px solid transparent; text-align: center; line-height: 1.25; }
.button-primary { background: var(--green); color: var(--on-dark); }
.button-primary:hover { background: var(--green-deep); }
.button-ghost { border-color: var(--green); color: var(--green); background: transparent; }
.button-ghost:hover { background: var(--green-soft); }
.button-accent { background: var(--terracotta-ink); color: #fff; }
.button-accent:hover { background: #8e421c; }

.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; color: var(--terracotta-ink); margin-bottom: .8em; }
.eyebrow-light { color: var(--on-dark-accent); }
.accent-text { color: var(--terracotta-ink); }

/* Hero */
.hero { padding: 48px 0 56px; }
.hero-inner { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero { padding: 80px 0 88px; } .hero-inner { grid-template-columns: 1.1fr .9fr; gap: 56px; } }
.lead { font-size: clamp(1.08rem, 1rem + .4vw, 1.25rem); color: var(--ink-soft); max-width: 40em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 18px; }
.hero-note { font-size: .95rem; color: var(--ink-soft); }
.hero-note::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--terracotta); margin-right: 10px; vertical-align: 1px; }
.hero-art { margin: 0; }
.hero-art svg { width: 100%; border-radius: 28px; box-shadow: 0 24px 60px -30px rgba(18, 58, 48, .55); }
.hero-art figcaption { font-size: .82rem; color: var(--ink-soft); margin-top: 10px; text-align: center; }

/* Frise inspirée des motifs géométriques kabyles */
.pattern-band {
  height: 22px;
  background-color: var(--green-deep);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='22' viewBox='0 0 44 22'%3E%3Cpath d='M0 22 L11 4 L22 22 Z' fill='%23c2602f'/%3E%3Cpath d='M22 0 L33 18 L44 0 Z' fill='%23f6f2ea' fill-opacity='.85'/%3E%3Ccircle cx='11' cy='16' r='2' fill='%23123a30'/%3E%3C/svg%3E");
  background-size: 44px 22px;
}

/* Sections */
.section { padding: 64px 0; }
@media (min-width: 960px) { .section { padding: 96px 0; } }
.cards { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 20px; }
@media (min-width: 760px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card p { color: var(--ink-soft); margin: 0; }
.card-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--green-soft); color: var(--green); margin-bottom: 18px; }

.section-name { background: var(--paper-deep); }
.name-inner { max-width: 820px; text-align: center; }
.name-inner p { font-size: 1.15rem; color: var(--ink-soft); }

.steps-grid { display: grid; gap: 20px; margin-top: 32px; }
@media (min-width: 960px) { .steps-grid { grid-template-columns: repeat(3, 1fr); } }
.steps { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; }
.steps h3 { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.tag { font-family: var(--font-sans); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--green); color: var(--on-dark); padding: 4px 12px; border-radius: 999px; }
.steps ol { counter-reset: step; list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; position: relative; padding-left: 44px; color: var(--ink); }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--terracotta); color: var(--terracotta-ink); font-weight: 700; display: grid; place-items: center; font-size: .9rem; line-height: 1; }
.steps-note { margin: 20px 0 0; padding-top: 16px; border-top: 1px dashed var(--line); font-size: .95rem; color: var(--ink-soft); }

.section-pilot { background: var(--green-deep); color: var(--on-dark); }
.section-pilot h2 { color: var(--on-dark); }
.section-pilot p { color: var(--on-dark-soft); }
.pilot-inner { display: grid; gap: 40px; align-items: start; }
@media (min-width: 960px) { .pilot-inner { grid-template-columns: 1.1fr .9fr; gap: 64px; } }
.pilot-facts { margin: 0; display: grid; gap: 1px; background: rgba(246, 242, 234, .18); border-radius: var(--radius); overflow: hidden; }
.pilot-facts div { background: var(--green); padding: 16px 22px; display: grid; gap: 2px; }
@media (min-width: 560px) { .pilot-facts div { grid-template-columns: 9.5rem 1fr; gap: 16px; } }
.pilot-facts dt { font-weight: 700; color: var(--on-dark-accent); }
.pilot-facts dd { margin: 0; color: var(--on-dark); }

.village-inner { display: grid; gap: 32px; align-items: center; }
@media (min-width: 960px) { .village-inner { grid-template-columns: 1.2fr .8fr; gap: 64px; } }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { padding-left: 30px; position: relative; }
.checklist li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 12px; height: 12px; background: var(--terracotta); transform: rotate(45deg); border-radius: 2px; }
.contact-card { background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--terracotta); border-radius: var(--radius); padding: 28px; }
.contact-card .button { width: 100%; margin: 8px 0 14px; word-break: break-word; }
.contact-card .small { color: var(--ink-soft); margin: 0; }

.section-download { background: var(--paper-deep); }
.download-inner { display: grid; gap: 28px; align-items: center; }
@media (min-width: 860px) { .download-inner { grid-template-columns: 1fr auto; gap: 48px; } }
.store-badge { display: inline-flex; align-items: center; gap: 14px; background: #1f1d1a; color: #fff; border-radius: 14px; padding: 12px 22px 12px 18px; opacity: .78; justify-self: start; cursor: default; border: 1px dashed #8a8578; }
.store-badge span { display: block; }
.store-small { font-size: .8rem; letter-spacing: .04em; }
.store-big { font-size: 1.35rem; font-weight: 700; line-height: 1.1; }

/* Pied de page */
.site-footer { background: var(--green-deep); color: var(--on-dark-soft); padding: 48px 0 24px; }
.footer-inner { display: grid; gap: 32px; }
@media (min-width: 760px) { .footer-inner { grid-template-columns: 1.3fr 1fr; } }
.footer-logo { height: 44px; width: auto; margin-bottom: 14px; }
.footer-name { font-family: var(--font-serif); font-size: 1.6rem; color: var(--on-dark); margin-bottom: .3em; }
.footer-brand strong { color: var(--on-dark); }
.footer-title { font-family: var(--font-sans); font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; color: var(--on-dark-accent); }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.footer-nav a { color: var(--on-dark); display: inline-flex; min-height: 40px; align-items: center; }
.footer-bottom { border-top: 1px solid rgba(246, 242, 234, .18); margin-top: 32px; padding-top: 20px; font-size: .9rem; }
.footer-bottom p { margin: 0; }

/* Pages légales */
.legal { max-width: 820px; padding-top: 48px; padding-bottom: 72px; }
.legal-header { border-bottom: 1px solid var(--line); padding-bottom: 24px; margin-bottom: 32px; }
.legal-header h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.8rem); }
.legal-meta { color: var(--ink-soft); font-size: .95rem; }
.legal-status { background: #fbefe4; border-left: 4px solid var(--terracotta); padding: 14px 18px; border-radius: 0 12px 12px 0; margin: 0; }
.legal section { margin-top: 40px; }
.legal h2 { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.75rem); }
.legal h3 { margin-top: 1.4em; font-size: 1.15rem; }
.legal ul, .legal ol { padding-left: 1.3em; }
.legal li { margin-bottom: .5em; }
.legal li ul { margin-top: .5em; }
.toc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; }
.toc h2 { font-family: var(--font-sans); font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; color: var(--terracotta-ink); }
.toc ol { margin: 0; columns: 1; }
@media (min-width: 720px) { .toc ol { columns: 2; column-gap: 40px; } }
.toc li { break-inside: avoid; margin-bottom: .1em; }
.toc a { display: inline-block; padding: 5px 0; }
.numbered > li { margin-bottom: 1em; }
.callout { background: var(--green-soft); border-radius: var(--radius); padding: 20px 24px; margin-top: 24px; }
.callout h3 { margin-top: 0; }
.callout p { margin: 0; }
.table-scroll { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: .97rem; }
th, td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
th { background: var(--paper-deep); color: var(--green-deep); }
tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 559px) {
  .table-scroll { border: 0; background: transparent; overflow: visible; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tr { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; padding: 4px 0; }
  td { border: 0; padding: 6px 16px; }
  td:first-child { font-weight: 700; color: var(--green-deep); }
  td[data-label]::before { content: attr(data-label) " : "; font-weight: 600; color: var(--ink-soft); }
}
.not-found { text-align: center; min-height: 50vh; }
.not-found .button { margin-top: 12px; }

@media print {
  .site-header, .pattern-band, .skip-link { display: none; }
  body { background: #fff; }
}
