/* Athosis Informatique - feuille de style unique, sans dépendance */

/* ---------- Thème clair (défaut) ---------- */
:root {
  color-scheme: light;
  --ink: #12302f;
  --ink-soft: #3d5655;
  --teal: #1f8f93;
  --orange: #e8801a;
  --on-orange: #12302f;
  --bg: #ffffff;
  --bg-alt: #f3f7f7;
  --card: #ffffff;
  --line: #d9e3e3;
  --link: #0f5b5e;
  --link-hover: #b5600c;
  --header-bg: rgba(255, 255, 255, .96);
  --cta-bg: #0f5b5e;
  --hero-from: #12302f;
  --hero-to: #0f5b5e;
  --footer-bg: #12302f;
  --shadow: 0 10px 24px rgba(18, 48, 47, .12);
  --radius: 10px;
  --max: 1080px;
}

/* ---------- Thème sombre : choix manuel ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e3f0f0;
  --ink-soft: #a9c3c3;
  --teal: #5cc7ca;
  --bg: #0e1a1a;
  --bg-alt: #132423;
  --card: #172b2b;
  --line: #29403f;
  --link: #6fd0d3;
  --link-hover: #f5b46b;
  --header-bg: rgba(14, 26, 26, .94);
  --cta-bg: #187378;
  --hero-from: #0a1515;
  --hero-to: #0f4a4d;
  --footer-bg: #091212;
  --shadow: 0 10px 24px rgba(0, 0, 0, .45);
}

/* ---------- Thème sombre : détection automatique du système ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ink: #e3f0f0;
    --ink-soft: #a9c3c3;
    --teal: #5cc7ca;
    --bg: #0e1a1a;
    --bg-alt: #132423;
    --card: #172b2b;
    --line: #29403f;
    --link: #6fd0d3;
    --link-hover: #f5b46b;
    --header-bg: rgba(14, 26, 26, .94);
    --cta-bg: #187378;
    --hero-from: #0a1515;
    --hero-to: #0f4a4d;
    --footer-bg: #091212;
    --shadow: 0 10px 24px rgba(0, 0, 0, .45);
  }
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

h1, h2, h3, h4 { line-height: 1.25; color: var(--ink); margin: 2rem 0 .75rem; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-top: 0; }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
h3 { font-size: 1.2rem; }
p, ul, ol { margin: 0 0 1.1rem; }
ul, ol { padding-left: 1.3rem; }
li { margin-bottom: .35rem; }

.wrap { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.narrow { width: min(100% - 2rem, 780px); margin-inline: auto; }

.skip {
  position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg);
  padding: .6rem 1rem; z-index: 100;
}
.skip:focus { left: 0; }

/* En-tête */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  width: min(100% - 2rem, 1200px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .5rem 1.5rem; padding-block: .6rem;
}
.brand { display: block; line-height: 0; }
.brand img { height: 48px; width: auto; }
.brand .logo-dark { display: none; }
:root[data-theme="dark"] .brand .logo-light { display: none; }
:root[data-theme="dark"] .brand .logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand .logo-light { display: none; }
  :root:not([data-theme="light"]) .brand .logo-dark { display: block; }
}
.header-right { display: flex; align-items: center; gap: .25rem .5rem; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .15rem .25rem; }
.nav li { margin: 0; }
.nav a {
  display: block; padding: .45rem .65rem; border-radius: 6px;
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: .98rem;
}
.nav a:hover { background: var(--bg-alt); color: var(--link); }
.nav a[aria-current="page"] { color: var(--link); box-shadow: inset 0 -3px 0 var(--orange); border-radius: 6px 6px 0 0; }
.nav a.cta { background: var(--cta-bg); color: #fff; }
.nav a.cta:hover { background: var(--orange); color: var(--on-orange); }
.nav a.cta[aria-current="page"] { color: #fff; box-shadow: none; border-radius: 6px; }
.nav a.cta[aria-current="page"]:hover { color: var(--on-orange); }

/* Bouton d'appel (affiché uniquement sur mobile) */
.call {
  display: none; align-items: center; gap: .4rem; margin-left: auto;
  padding: .5rem .9rem; border-radius: 8px; background: var(--orange); color: var(--on-orange);
  font-weight: 600; text-decoration: none;
}
.call:hover { background: #f5b46b; color: var(--on-orange); }
.call svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Sélecteur de thème (affiché uniquement si JavaScript est actif) */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0; border-radius: 8px;
  border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { background: var(--bg-alt); color: var(--link); }
.theme-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Boutons */
.btn {
  display: inline-block; padding: .75rem 1.4rem; border-radius: var(--radius);
  background: var(--orange); color: var(--on-orange); font-weight: 600; text-decoration: none;
  border: 2px solid var(--orange);
}
.btn:hover { background: #f5b46b; border-color: #f5b46b; color: var(--on-orange); }
.btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.btn.ghost:hover { background: rgba(255, 255, 255, .15); border-color: #fff; color: #fff; }
.btn.outline { background: transparent; color: var(--link); border-color: var(--link); }
.btn.outline:hover { background: var(--link); color: var(--bg); border-color: var(--link); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* Bandeau d'accueil */
.hero {
  background: linear-gradient(135deg, var(--hero-from) 0%, var(--hero-to) 100%);
  color: #fff; padding: clamp(3rem, 8vw, 6rem) 0;
}
.hero h1 { color: #fff; max-width: 18ch; }
.hero p { max-width: 62ch; font-size: 1.15rem; color: #e3f0f0; }
.hero .eyebrow { color: #f5b46b; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; margin-bottom: .75rem; }

/* Sections */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section.alt { background: var(--bg-alt); }
.section > .wrap > h2:first-child, .section > .narrow > h2:first-child { margin-top: 0; }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 65ch; }

/* En-tête de page interne */
.page-head { background: var(--bg-alt); border-bottom: 1px solid var(--line); padding: 2.5rem 0 2rem; }
.page-head h1 { margin-bottom: .5rem; }
.page-head p { margin: 0; color: var(--ink-soft); max-width: 65ch; font-size: 1.1rem; }

/* Cartes de services */
.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 1.75rem; }
.card {
  display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: inherit; }
.card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card .body { padding: 1.1rem 1.25rem 1.3rem; }
.card h3 { margin: 0 0 .4rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: .98rem; }
.cards-more { margin: 1.5rem 0 0; color: var(--ink-soft); }

/* Points forts */
.points { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 1.5rem; }
.points div { border-left: 4px solid var(--orange); padding-left: 1rem; }
.points h3 { margin: 0 0 .3rem; font-size: 1.1rem; }
.points p { margin: 0; color: var(--ink-soft); font-size: .98rem; }
.points + p { margin-top: 1.75rem; }

/* Tarifs */
.pricing a { color: inherit; }
.pricing a:hover { color: var(--link-hover); }
.pricing { list-style: none; padding: 0; display: grid; gap: .75rem; max-width: 640px; }
.pricing li {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .9rem 1.2rem; margin: 0;
}
.note { font-size: .92rem; color: var(--ink-soft); }

/* Contenu des pages internes */
.content img.figure, .section img.figure {
  display: block; width: 100%; max-width: 420px; height: auto;
  border-radius: var(--radius); margin: 0 auto 2rem; border: 1px solid var(--line);
}
.content h2:first-child { margin-top: 0; }
.section img.figure.wide { max-width: 680px; }
.wrap > img.figure { margin-left: 0; }
.measure { max-width: 70ch; }
.checks { list-style: none; padding: 0; }
.checks li { position: relative; padding-left: 1.7rem; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 700; }
.two-col { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.report { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; background: var(--card); max-width: 320px; }
.report p { margin: .75rem 0 0; font-size: .92rem; color: var(--ink-soft); }

/* Contact */
.contact-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.contact-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.contact-item h2 { margin: 0 0 .5rem; font-size: 1.05rem; color: var(--link); }
.contact-item p { margin: 0; }
.contact-item a { color: inherit; }
.contact-item a:hover { color: var(--link-hover); }
.contact-item .map-link { display: inline-block; margin: .35rem 0 .5rem; font-weight: 600; }
.contact-item .map-link a { color: var(--link); }
.contact-item .map-link a:hover { color: var(--link-hover); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.payments { list-style: none; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.payments li { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .45rem .8rem; }
.payments img { height: 28px; width: auto; }

/* Pied de page */
.site-footer { background: var(--footer-bg); color: #c9dcdc; padding: 2.5rem 0 1.5rem; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #f5b46b; }
.site-footer .cols { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.site-footer h2 { color: #fff; font-size: 1rem; margin: 0 0 .6rem; }
.site-footer p, .site-footer ul { margin: 0; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer .legal { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, .15); font-size: .85rem; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header { position: static; }
  .call { display: inline-flex; }
  .header-right { flex-basis: 100%; align-items: flex-start; }
  .nav a { padding: .4rem .6rem; font-size: .93rem; }
}

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

@media print {
  .site-header, .site-footer .cols, .actions { display: none; }
}
