/* Charte Oliv-IT : olive (arbre du logo), bleu (tuile "IT"), fond papier chaud.
   Memes jetons que ai-tools.oliv-it.fr. Polices systeme : aucun telechargement. */
:root {
  --olive: #605818;
  --olive-strong: #4a4312;
  --olive-soft: #f1eedf;
  --blue: #0068b0;
  --blue-strong: #00528c;
  --blue-soft: #e5f0f9;
  --bg: #faf9f4;
  --surface: #ffffff;
  --text: #2a2716;
  --muted: #5f5a45;
  --border: #e2ddc8;
  --shadow: 0 1px 2px rgba(42, 39, 22, 0.05), 0 6px 20px rgba(42, 39, 22, 0.06);
  --radius: 12px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --on-accent: #fff;
  --logo-plate: transparent;
  --logo-pad: 0;
  color-scheme: light;
}

/* Theme sombre : choix explicite (data-theme="dark"), ou reglage du systeme
   sauf si le visiteur a choisi le theme clair. */
:root[data-theme="dark"] {
    --olive: #c9bd72;
    --olive-strong: #ddd294;
    --olive-soft: #2d2a1a;
    --blue: #4ea3e6;
    --blue-strong: #7dbdf0;
    --blue-soft: #16293a;
    --bg: #191812;
    --surface: #23221a;
    --text: #eeebdc;
    --muted: #b3ae96;
    --border: #3a3727;
    --shadow: none;
    --on-accent: #0d1b26;
    --logo-plate: #faf9f4;
    --logo-pad: 3px 6px;
    color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
      --olive: #c9bd72;
      --olive-strong: #ddd294;
      --olive-soft: #2d2a1a;
      --blue: #4ea3e6;
      --blue-strong: #7dbdf0;
      --blue-soft: #16293a;
      --bg: #191812;
      --surface: #23221a;
      --text: #eeebdc;
      --muted: #b3ae96;
      --border: #3a3727;
      --shadow: none;
      --on-accent: #0d1b26;
      --logo-plate: #faf9f4;
      --logo-pad: 3px 6px;
      color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::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(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--blue-strong); }
h1, h2, h3 { font-family: var(--serif); color: var(--olive-strong); line-height: 1.2; margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.2em; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 50%, transparent); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.skip-link { position: absolute; left: 16px; top: -100px; background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 12px; }

/* ---------- En-tete ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; flex-shrink: 0; }
.brand img { height: 52px; width: auto; display: block; background: var(--logo-plate); padding: var(--logo-pad); border-radius: 8px; }
.brand-name { font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--olive-strong); line-height: 1.1; }
.brand-name small { display: block; font-style: normal; font-family: var(--sans); font-size: 0.78rem; color: var(--muted); }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--text); text-decoration: none; font-size: 0.95rem; padding: 8px 9px; border-radius: 8px; white-space: nowrap; }
.nav a:hover { background: var(--olive-soft); color: var(--olive-strong); }
.nav .btn { margin-left: 8px; }

/* Selecteur de theme : affiche par assets/site.js (sans JS, le theme suit le systeme) */
.theme-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); flex-shrink: 0; }
.theme-switch button {
  width: 32px; height: 30px; display: grid; place-items: center;
  border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; padding: 0;
}
.theme-switch button:hover { color: var(--olive-strong); background: var(--olive-soft); }
.theme-switch button[aria-pressed="true"] { background: var(--surface); color: var(--blue); box-shadow: 0 0 0 1px var(--border); }
.nav + .theme-switch { margin-left: 4px; }
.brand + .theme-switch { margin-left: auto; }

/* Menu mobile sans JavaScript */
.menu { display: none; margin-left: auto; position: relative; }
.menu summary { list-style: none; cursor: pointer; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.95rem; font-weight: 600; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--olive-soft); }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 8px; display: flex; flex-direction: column;
}
.menu-panel a { padding: 10px 12px; border-radius: 8px; color: var(--text); text-decoration: none; }
.menu-panel a:hover { background: var(--olive-soft); }
@media (max-width: 1080px) {
  .nav { display: none; }
  .menu { display: block; margin-left: 0; }
  .theme-switch { margin-left: auto; }
  .site-header .wrap { gap: 12px; }
}
@media (max-width: 420px) {
  .brand img { height: 44px; }
  .brand-name small { display: none; }
}
@media (max-width: 360px) {
  .brand-name { display: none; }
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 1rem/1.2 var(--sans);
  padding: 13px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--blue); color: var(--on-accent); }
.btn-primary:hover { background: var(--blue-strong); color: var(--on-accent); }
.btn-secondary { background: var(--surface); color: var(--olive-strong); border-color: var(--border); }
.btn-secondary:hover { background: var(--olive-soft); color: var(--olive-strong); }
.btn-small { padding: 9px 14px; font-size: 0.92rem; }
.nav a.btn-primary, .nav a.btn-primary:hover { color: var(--on-accent); }
.btn svg { flex-shrink: 0; }

/* ---------- Sections ---------- */
main { flex: 1; }
.section { padding: 72px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--olive);
  margin: 0 0 12px;
}
.eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--olive); }
.section-intro { max-width: 68ch; color: var(--muted); font-size: 1.08rem; margin-bottom: 36px; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 56px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 0.35em; }
.hero h1 span { display: block; font-size: 0.55em; font-style: italic; font-weight: 400; color: var(--olive); margin-top: 0.3em; letter-spacing: 0; }
.lead { font-size: 1.15rem; max-width: 60ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.facts {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px; margin: 0;
}
.profile { display: flex; align-items: center; gap: 18px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.profile picture { flex-shrink: 0; line-height: 0; }
.profile img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 3px solid var(--olive-soft); }
.profile h2 { font-size: 1.2rem; margin: 0 0 4px; }
.profile p { margin: 0; font-size: 0.92rem; color: var(--muted); line-height: 1.45; }
.facts ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.facts li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; font-size: 0.97rem; }
.facts strong { display: block; font-family: var(--serif); font-size: 1.35rem; color: var(--olive-strong); line-height: 1.1; }
.dot { width: 10px; height: 10px; margin-top: 8px; border-radius: 3px; background: var(--blue); }
@media (max-width: 860px) {
  .hero { padding: 40px 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
}

.trust { border-top: 1px solid var(--border); padding: 22px 0; }
.trust p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.trust strong { color: var(--text); font-weight: 600; }

/* ---------- Grilles et cartes ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px;
  display: flex; flex-direction: column;
}
.section-alt .card { background: var(--bg); box-shadow: none; }
.card h3 { margin-bottom: 6px; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card ul { padding-left: 1.1em; }
.card li { margin-bottom: 6px; }
.card li::marker { color: var(--olive); }
.target { font-size: 0.9rem; font-weight: 600; color: var(--blue); margin-bottom: 12px; }

.offer { border-top: 4px solid var(--olive); }
.offer:nth-child(2) { border-top-color: var(--blue); }

.expertise { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 28px 40px; }
.expertise h3 { display: flex; align-items: center; gap: 10px; }
.expertise h3 svg { color: var(--blue); flex-shrink: 0; }
.expertise p { margin: 0; color: var(--muted); }

/* Demarche */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 20px; counter-reset: step; }
.steps li { counter-increment: step; padding-top: 16px; border-top: 2px solid var(--border); }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block; font-family: var(--serif); font-size: 1.6rem; color: var(--blue); margin-bottom: 6px;
}
.steps h3 { font-size: 1.1rem; }
.steps p { color: var(--muted); margin: 0; font-size: 0.97rem; }

/* References */
.ref .tag { align-self: flex-start; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em; color: var(--olive-strong); background: var(--olive-soft); padding: 3px 10px; border-radius: 999px; margin-bottom: 12px; }
.ref .client { font-size: 0.78rem; color: var(--muted); margin-bottom: 10px; letter-spacing: 0.01em; }
.ref p { font-size: 0.97rem; }
.figures { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.9rem; font-weight: 600; color: var(--blue); }
.clients { margin-top: 32px; color: var(--muted); font-size: 0.8rem; line-height: 1.5; }
.clients strong { font-weight: 600; }

/* Partenaires */
.partner h3 { font-size: 1.4rem; }
.partner .target { margin-bottom: 14px; }
.partner-link { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); font-weight: 600; font-size: 0.95rem; }
.partner-link a::after { content: " ↗"; }
.trust strong a { color: inherit; text-decoration-color: var(--border); }
.trust strong a:hover { color: var(--blue); }

/* Outils IA : section compacte */
.section-compact { padding: 48px 0; }
.section-compact h2 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); }
.ai-tools { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.ai-tools p:last-child { margin-bottom: 0; }
.ai-tool { text-decoration: none; color: var(--text); gap: 6px; transition: border-color 0.15s; }
.ai-tool:hover { border-color: var(--blue); color: var(--text); }
.ai-tool .tag { align-self: flex-start; font-size: 0.72rem; font-weight: 600; color: var(--olive-strong); background: var(--olive-soft); padding: 2px 9px; border-radius: 999px; }
.ai-tool strong { font-family: var(--serif); font-size: 1.1rem; color: var(--olive-strong); }
.ai-tool span { font-size: 0.92rem; color: var(--muted); }
.ai-tool .go { color: var(--blue); font-weight: 600; margin-top: 4px; }
@media (max-width: 760px) { .ai-tools { grid-template-columns: 1fr; gap: 20px; } }

/* Parcours */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.timeline li { position: relative; padding: 0 0 26px 26px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--olive); }
.timeline li:first-child::before { background: var(--blue); border-color: var(--blue); }
.timeline .when { display: block; font-size: 0.88rem; font-weight: 600; color: var(--blue); }
.timeline h3 { font-size: 1.08rem; margin: 2px 0 4px; }
.timeline p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.aside h3 { font-size: 1.08rem; }
.aside ul { list-style: none; padding: 0; }
.aside li { margin-bottom: 12px; }
.aside li span { display: block; color: var(--muted); font-size: 0.92rem; }

/* Societe */
.company { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.company dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; font-size: 0.97rem; }
.company dt { color: var(--muted); }
.company dd { margin: 0; font-weight: 500; }
@media (max-width: 860px) { .company { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .company dl { grid-template-columns: 1fr; gap: 2px; } .company dd { margin-bottom: 10px; } }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 36px 18px 0; position: relative;
  font-family: var(--serif); font-size: 1.12rem; font-weight: 700; color: var(--olive-strong);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font: 400 1.5rem/1 var(--sans); color: var(--blue); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 18px; color: var(--muted); }

/* Contact */
.contact { text-align: center; }
.contact .section-intro { margin-left: auto; margin-right: auto; }
.contact .actions { justify-content: center; }
.contact-lines { font-style: normal; margin-top: 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; color: var(--muted); font-size: 0.97rem; }

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 0.9rem; padding: 32px 0; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 16px 40px; justify-content: space-between; }
.site-footer p { margin: 0 0 4px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--blue); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; margin: 0; }

/* ---------- Pages de texte (mentions legales, 404) ---------- */
.prose { max-width: 760px; padding-top: 48px; padding-bottom: 64px; }
.prose h2 { font-size: 1.3rem; margin-top: 1.8em; }

/* Choix des outils : domaines, types d'outils en avant, exemples en retrait */
.tool-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 16px; }
@media (min-width: 1080px) { .tool-grid { grid-template-columns: repeat(4, 1fr); } }
.tool-family { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--blue); border-radius: 10px; padding: 18px 20px; }
.section-alt .tool-family { background: var(--bg); }
.tool-family h3 { font-size: 1.15rem; margin: 0 0 12px; }
.tool-family ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.tool-family li strong { display: block; font-weight: 600; font-size: 0.95rem; line-height: 1.35; }
.tool-family .tool-examples { display: block; font-size: 0.76rem; color: var(--muted); line-height: 1.4; margin-top: 1px; }

/* Missions supplementaires (bloc depliable) */
.more-missions { margin-top: 32px; }
.more-missions > summary {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none;
  font-weight: 600; color: var(--olive-strong); padding: 11px 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
}
.more-missions > summary::-webkit-details-marker { display: none; }
.more-missions > summary::after { content: "+"; font-size: 1.2rem; line-height: 1; color: var(--blue); }
.more-missions[open] > summary::after { content: "−"; }
.more-missions > summary:hover { background: var(--olive-soft); }
.more-missions h3 { font-size: 1.1rem; margin: 36px 0 14px; }
.missions { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 14px; }
.mission { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; display: flex; flex-direction: column; }
.section-alt .mission { background: var(--bg); }
.mission .tag { align-self: flex-start; font-size: 0.72rem; font-weight: 600; color: var(--olive-strong); background: var(--olive-soft); padding: 2px 9px; border-radius: 999px; margin-bottom: 8px; }
.mission h4 { font-family: var(--serif); font-size: 1rem; color: var(--olive-strong); line-height: 1.25; margin: 0 0 4px; }
.mission .client { font-size: 0.75rem; color: var(--muted); margin: 0 0 6px; }
.mission p { font-size: 0.88rem; line-height: 1.5; color: var(--muted); margin: 0; }
