/* Assistance 08 : couleurs du logo, esprit album de bande dessinée */
@font-face { font-family: "Bangers"; src: url("../fonts/Bangers-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Patrick Hand"; src: url("../fonts/PatrickHand-Regular.ttf") format("truetype"); font-display: swap; }

:root {
  /* Thème sombre par défaut ; le thème clair s'active avec data-theme="light" (bouton de la barre du haut) */
  color-scheme: dark;
  --ink: #e8edf5;          /* texte */
  --line: #55688a;         /* bordures */
  --shadow-c: #02060c;     /* ombres dures de la bande dessinée */
  --paper: #0e1622;        /* fond de page */
  --cream: #152033;        /* bandeaux */
  --surface: #1a2638;      /* cartes, menus, champs */
  --link: #7fb0ff;
  --link-hover: #ffb066;
  --blue: #1f5ad0;
  --blue-light: #4d8bff;
  --orange: #c8650f;
  --yellow: #ffe27a;
  --on-yellow: #16202e;    /* texte posé sur le jaune, dans les deux thèmes */
  --muted: #a7b3c4;
  --rule: #2f3d55;
  --foot-bg: #080d15;
  --bd-bg: #172234;
  --bd-dots: rgba(255, 226, 122, .10);
  --ok-bg: #1f4a2c;
  --err-bg: #5a2620;
  --border: 3px solid var(--line);
  --shadow: 5px 5px 0 var(--shadow-c);
}
:root[data-theme="light"] {
  color-scheme: light;
  --ink: #16202e;
  --line: #16202e;
  --shadow-c: #16202e;
  --paper: #fffbef;
  --cream: #f8efd6;
  --surface: #fff;
  --link: #1f5ad0;
  --link-hover: #c8650f;
  --muted: #55606e;
  --rule: #d9d2bd;
  --foot-bg: #16202e;
  --bd-bg: #f6e5b4;
  --bd-dots: rgba(200, 101, 15, .22);
  --ok-bg: #d9efc8;
  --err-bg: #f9d3cb;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--blue-light); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.15; }
h1, h2 { font-family: "Bangers", "Impact", sans-serif; font-weight: 400; letter-spacing: .03em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.1rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.3rem); margin: 0 0 .6em; }
h3 { font-size: 1.15rem; margin: 0 0 .4em; }

.wrap { width: min(1240px, 100% - 2rem); margin-inline: auto; }
.section { padding-block: 3rem; }
.small { font-size: .9rem; }
.meta { color: var(--muted); font-size: .9rem; margin: 0 0 .4rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: #16202e; color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 0; color: #fff; }
.icon { width: 1.25em; height: 1.25em; vertical-align: -.25em; }

/* Boutons */
.btn {
  display: inline-block; padding: .65rem 1.3rem; background: var(--blue); color: #fff;
  border: var(--border); box-shadow: 3px 3px 0 var(--shadow-c); border-radius: 10px;
  font-weight: 700; text-decoration: none; transition: transform .12s, box-shadow .12s;
}
.btn:hover { color: #fff; transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--shadow-c); }
.btn-alt { background: var(--surface); color: var(--ink); }
.btn-alt:hover { color: var(--ink); }
.btn-small { padding: .35rem .85rem; font-size: .95rem; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* Barre du haut */
.topbar { background: var(--surface); border-bottom: var(--border); position: relative; z-index: 20; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .5rem; }
.logo img { display: block; height: 52px; width: auto; }
.nav { display: flex; align-items: center; gap: .8rem; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav > ul { display: flex; align-items: center; gap: .1rem; }
.nav a, .sub-toggle {
  display: block; padding: .45rem .7rem; border: 0; background: none; border-radius: 8px;
  color: var(--ink); font: inherit; font-size: 1rem; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.nav a:hover, .sub-toggle:hover { background: var(--yellow); color: var(--on-yellow); }
.nav a[aria-current] { color: var(--link); }
.nav a[aria-current]:hover { color: var(--on-yellow); }
.sub-toggle::after { content: " \25BE"; }
.has-sub { position: relative; }
.sub {
  display: none; position: absolute; top: 100%; left: 0; min-width: 250px; padding: .4rem !important;
  background: var(--surface); border: var(--border); box-shadow: var(--shadow); border-radius: 10px;
}
.sub-toggle[aria-expanded="true"] + .sub { display: block; }
@media (hover: hover) and (min-width: 1290px) {
  .has-sub:hover .sub { display: block; }
}
.search { display: flex; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.search input { border: 0; padding: .3rem .55rem; width: 8.5rem; font: inherit; font-size: .95rem; min-width: 0; background: transparent; color: var(--ink); }
.search button { border: 0; border-left: 2px solid var(--line); background: var(--yellow); padding: 0 .5rem; cursor: pointer; color: var(--on-yellow); }
.search-big { max-width: 560px; margin-bottom: 1.5rem; }
.search-big input { width: 100%; padding: .6rem .8rem; }
.burger { display: none; width: 46px; height: 42px; padding: 8px; background: var(--yellow); border: var(--border); border-radius: 8px; cursor: pointer; }
.burger span { display: block; height: 3px; background: var(--on-yellow); margin: 3px 0; }

@media (max-width: 1289px) {
  .burger { display: block; }
  .topbar-in { flex-wrap: wrap; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-block: .5rem; }
  .nav.is-open { display: flex; }
  .nav > ul { flex-direction: column; align-items: stretch; }
  .sub-toggle { width: 100%; text-align: left; }
  .sub { position: static; box-shadow: none; border-width: 2px; margin: .2rem 0 .4rem .6rem; }
  .search input { width: 100%; }
}
@media (max-width: 420px) { .logo img { height: 42px; } }

/* Bande dessinée */
.bd {
  padding-block: 1.1rem 1.4rem; border-bottom: var(--border);
  background-color: var(--bd-bg);
  background-image: radial-gradient(var(--bd-dots) 1.3px, transparent 1.4px);
  background-size: 11px 11px;
}
.bd-top { display: flex; justify-content: flex-end; align-items: center; gap: 1rem; margin-bottom: .7rem; }
.bd-ctrl { display: flex; gap: .4rem; }
.bd-ctrl[hidden] { display: none; }
.bd-btn {
  width: 42px; height: 38px; background: var(--surface); color: var(--ink); border: var(--border); border-radius: 8px;
  box-shadow: 2px 2px 0 var(--shadow-c); font-size: 1.1rem; font-weight: 700; line-height: 1; cursor: pointer;
}
.bd-btn:hover { background: var(--yellow); color: var(--on-yellow); }
.bd-slides { display: grid; }
.bd-slide { grid-area: 1 / 1; visibility: hidden; opacity: 0; transition: opacity .35s, visibility .35s; min-width: 0; }
.bd-slide.is-active { visibility: visible; opacity: 1; }
.bd-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; }
.bd-panel { display: block; width: 100%; height: auto; background: #fff; box-shadow: 4px 4px 0 var(--shadow-c); }
.bd-t { font-family: "Patrick Hand", "Segoe UI", sans-serif; }
.bd-fx { font-family: "Bangers", "Impact", sans-serif; letter-spacing: .5px; }
.bd-slide.is-active .bd-panel { animation: bd-pop .5s both; }
.bd-slide.is-active .bd-panel:nth-child(2) { animation-delay: .25s; }
.bd-slide.is-active .bd-panel:nth-child(3) { animation-delay: .5s; }
@keyframes bd-pop { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.bd-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: .85rem; }
.bd-title { margin: 0; font-family: "Bangers", "Impact", sans-serif; font-weight: 400; letter-spacing: .03em; line-height: 1.15; font-size: clamp(1.35rem, 2.6vw, 1.85rem); }
.bd-title span { display: inline-block; background: var(--yellow); color: var(--on-yellow); border: 2px solid var(--on-yellow); padding: 0 .45em; margin-right: .3em; font-size: .72em; transform: rotate(-2deg); }
.bd-tabs { display: grid; gap: .4rem; margin-top: .85rem; }
.bd-tabgroup { display: flex; align-items: center; gap: .35rem; overflow-x: auto; padding: 3px; scrollbar-width: thin; }
.bd-tablabel { flex: 0 0 11.5rem; font: 400 1.25rem/1 "Bangers", sans-serif; letter-spacing: .03em; color: var(--link); }
.bd-tabs[hidden] { display: none; }
.bd-tabs button {
  flex: 1 0 auto; padding: .3rem .7rem; background: var(--surface); color: var(--ink); border: 2px solid var(--line); border-radius: 8px;
  font: 400 1.02rem "Patrick Hand", "Segoe UI", sans-serif; cursor: pointer; white-space: nowrap;
}
.bd-tabs button:hover { background: var(--yellow); color: var(--on-yellow); }
.bd-tabs button[aria-current] { background: var(--blue); border-color: var(--blue); color: #fff; }
@media (max-width: 899px) {
  .bd-tablabel { flex-basis: auto; white-space: nowrap; margin-right: .3rem; }
  .bd-strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: .6rem; padding: 0 0 8px; }
  .bd-panel { flex: 0 0 min(88%, 460px); scroll-snap-align: center; }
  .bd-slide.is-active .bd-panel { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bd-slide { transition: none; }
  .bd-slide.is-active .bd-panel { animation: none; }
  .btn { transition: none; }
}

/* Accueil */
.intro { padding-block: 2.6rem 0; max-width: 900px; text-align: center; }
.intro .actions { justify-content: center; }
.lead { font-size: 1.2rem; }
.grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.section-lead { font-size: 1.1rem; margin: -.3em 0 1.3rem; max-width: 760px; }
.tech-band { background: var(--cream); border-bottom: var(--border); padding-block: 2.6rem; }
.tech-band h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); }
.tech-band .service { box-shadow: 3px 3px 0 var(--shadow-c); padding: .85rem 1rem; }
.tech-band .service-ic { width: 42px; height: 42px; font-size: 1.05rem; }
.tech-band .service strong { font-size: 1rem; }
.tech-band .service span:last-child { font-size: .95rem; }
.service {
  display: grid; grid-template-columns: auto 1fr; align-content: start; column-gap: .9rem; padding: 1.1rem 1.2rem;
  background: var(--surface); border: var(--border); border-radius: 12px; box-shadow: var(--shadow);
  color: var(--ink); text-decoration: none; transition: transform .12s, box-shadow .12s;
}
.service:hover { color: var(--ink); transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--shadow-c); }
.service-big { grid-template-columns: 1fr; row-gap: .5rem; padding: 1.4rem 1.3rem; }
.service-big .service-ic { width: 64px; height: 64px; font-size: 1.6rem; grid-row: auto; }
.service-big strong { font-size: 1.2rem; }
.service-ic { grid-row: span 2; display: grid; place-items: center; width: 52px; height: 52px; background: var(--yellow); color: var(--on-yellow); border: 2px solid var(--on-yellow); border-radius: 50%; font-size: 1.3rem; }
.service strong { font-size: 1.1rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }

.ia-band { background: #17294a; color: #fff; border-block: var(--border); }
.ia-band a:not(.btn) { color: #9ec2ff; }
.ia-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2.5rem; align-items: center; padding-block: 3rem; }
.ia-band h2 { color: var(--yellow); }
.ia-art .bd-panel { box-shadow: 7px 7px 0 var(--blue-light); }
.kicker { display: inline-block; margin: 0 0 .6rem; padding: 0 .55em; background: var(--yellow); color: var(--on-yellow); font: 400 1.05rem "Patrick Hand", sans-serif; border: 2px solid var(--on-yellow); transform: rotate(-2deg); }
.ticks { list-style: none; padding: 0; }
.ticks li { padding-left: 1.6em; position: relative; margin-bottom: .4rem; }
.ticks li::before { content: "\2713"; position: absolute; left: 0; font-weight: 700; color: var(--yellow); }
@media (max-width: 899px) { .ia-grid { grid-template-columns: 1fr; } }

.partners { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 1.5rem; padding-bottom: 0; }
.partner { display: flex; align-items: center; gap: 1.1rem; padding: 1rem 1.2rem; background: var(--surface); border: var(--border); border-radius: 12px; color: var(--ink); text-decoration: none; }
.partner:hover { color: var(--ink); background: var(--cream); }
.partner img { width: 110px; flex: none; background: #fff; border-radius: 6px; padding: 4px; }

.card { background: var(--surface); border: var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.card-img { display: block; background: var(--cream); border-bottom: var(--border); }
.card-img img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; }
.card-body { padding: 1rem 1.15rem 1.15rem; }
.card-body h3 a { color: var(--ink); text-decoration: none; }
.card-body h3 a:hover { color: var(--link); text-decoration: underline; }
.card-body p:last-child { margin: 0; font-size: .98rem; }

.cta-band { background: var(--yellow); color: var(--on-yellow); border-top: var(--border); margin-top: 1rem; }
.cta-in { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; padding-block: 2rem; }
.cta-in h2 { margin: 0 0 .2rem; }
.cta-in p { margin: 0; }
.cta-in a:not(.btn) { color: var(--on-yellow); font-weight: 700; }
.cta-in .btn { border-color: var(--on-yellow); box-shadow: 3px 3px 0 var(--on-yellow); }

/* Pages intérieures */
.page-head { background: var(--cream); border-bottom: var(--border); padding-block: 1.8rem 1.2rem; }
.page-head h1 { margin-bottom: .1em; }
.page-head .meta { margin: 0; }
.prose { max-width: 860px; }
.prose img { border-radius: 6px; }
.prose figure { margin: 1.2rem 0; }
.prose figcaption { color: var(--muted); font-size: .95rem; margin-top: .3rem; }
.prose table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
.prose td, .prose th { border: 2px solid var(--line); padding: .55rem .75rem; text-align: left; vertical-align: top; }
.prose th { background: var(--cream); }
.prose h2 { margin-top: 1.5em; }
.prose h3 { margin-top: 1.5em; }
.prose hr { border: 0; border-top: 2px solid var(--line); margin: 1.6rem 0; }
.prose a { overflow-wrap: anywhere; }
.article-img img { display: block; max-height: 340px; width: auto; border: var(--border); }
.pills { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.6rem; }
.article .pills { margin: 1.8rem 0; }
.pill { padding: .2rem .8rem; background: var(--surface); border: 2px solid var(--line); border-radius: 99px; color: var(--ink); font-weight: 600; font-size: .95rem; text-decoration: none; }
.pill:hover, .pill[aria-current] { background: var(--blue); border-color: var(--blue); color: #fff; }
.prevnext { display: flex; justify-content: space-between; gap: 1.5rem; border-top: 2px solid var(--line); padding-top: 1rem; }
.prevnext a:last-child:not(:first-child) { text-align: right; }
.results { list-style: none; padding: 0; }
.results li { padding-block: .8rem; border-bottom: 1px solid var(--rule); }
.results a { font-weight: 700; }
.note { padding: .9rem 1.1rem; background: var(--cream); border: 2px solid var(--line); border-radius: 10px; }
.steps { padding-left: 1.3rem; }
.steps li { margin-bottom: .5rem; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1rem; margin: 1.2rem 0; }
.tile { padding: 1rem 1.15rem; background: var(--surface); border: var(--border); border-radius: 12px; box-shadow: 3px 3px 0 var(--shadow-c); }
.tile h3 { margin-top: 0; }
.tile p, .tile ul { margin-block: .3rem 0; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; }
.tags li { padding: .1rem .7rem; background: var(--yellow); color: var(--on-yellow); border: 2px solid var(--on-yellow); border-radius: 99px; font-weight: 600; font-size: .95rem; }

/* Formulaire */
.form { display: grid; gap: 1rem; max-width: 620px; }
.form label { font-weight: 600; display: block; margin-bottom: .2rem; }
.form input, .form textarea { width: 100%; padding: .55rem .7rem; border: 2px solid var(--line); border-radius: 8px; font: inherit; background: var(--surface); color: var(--ink); }
.form .hp { position: absolute; left: -9999px; }
.alert { padding: .8rem 1rem; border: 2px solid var(--line); border-radius: 8px; margin-bottom: 1rem; }
.alert-ok { background: var(--ok-bg); }
.alert-err { background: var(--err-bg); }
.alert ul { margin: 0; padding-left: 1.2rem; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 2.5rem; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

.notfound { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; align-items: center; }
@media (max-width: 760px) { .notfound { grid-template-columns: 1fr; } }

/* Pied de page */
.foot { background: var(--foot-bg); color: #e9e6da; padding-block: 2.4rem 1rem; }
.foot a { color: #fff; }
.foot a:hover { color: var(--yellow); }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 2rem; }
.foot-title { font-family: "Bangers", sans-serif; font-size: 1.35rem; letter-spacing: .04em; color: var(--yellow); margin: 0 0 .4rem; }
.foot-grid p { margin: 0 0 .6rem; }
.foot-note { color: #b9b6a8; border-top: 1px solid #3b4658; margin-top: 1.6rem; padding-top: .8rem; }

/* Bouton de changement de thème, dans le pied de page */
.foot-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.foot-bottom p { margin: 0; }
.theme-toggle { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .8rem; background: transparent; color: #e9e6da; border: 2px solid #55688a; border-radius: 8px; font: inherit; font-size: .95rem; cursor: pointer; }
.theme-toggle:hover { background: var(--yellow); border-color: var(--yellow); color: var(--on-yellow); }
.theme-toggle .icon { width: 1.25em; height: 1.25em; display: block; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: block; }
:root[data-theme="light"] .theme-toggle .i-moon { display: none; }

/* Avis Trustpilot : note affichée sans script externe, étoiles remplies selon la note (classes r0 à r50) */
.trust-wrap { margin: 1.2rem 0 0; }
.trust { display: inline-flex; align-items: center; gap: .6rem; padding: .35rem .9rem; background: var(--surface); border: 2px solid var(--line); border-radius: 99px; color: var(--ink); text-decoration: none; }
.trust:hover { color: var(--ink); background: var(--cream); }
.stars { --fill: 100%; font-size: 1.3rem; letter-spacing: .08em; line-height: 1; background: linear-gradient(90deg, #00b67a var(--fill), #6f7f99 var(--fill)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stars.r0 { --fill: 0%; }
.stars.r5 { --fill: 10%; }
.stars.r10 { --fill: 20%; }
.stars.r15 { --fill: 30%; }
.stars.r20 { --fill: 40%; }
.stars.r25 { --fill: 50%; }
.stars.r30 { --fill: 60%; }
.stars.r35 { --fill: 70%; }
.stars.r40 { --fill: 80%; }
.stars.r45 { --fill: 90%; }
.stars.r50 { --fill: 100%; }
.trust-load { display: block; margin: .6rem auto 0; padding: .25rem .8rem; background: transparent; color: var(--link); border: 0; font: inherit; font-size: .9rem; text-decoration: underline; cursor: pointer; }
.trust-load:hover { color: var(--link-hover); }
.trust-live { min-height: 24px; margin-top: .4rem; }
.trust[hidden], .trust-load[hidden] { display: none; }
.trust-fallback { display: block; text-align: center; }
.trust-fallback[hidden] { display: none; }
