/* OctoLink — feuille de style */

:root {
  --abysse: #0E2A3A;
  --abysse-2: #17394C;
  --abysse-3: #22495E;
  --lagon: #1F6F78;
  --lagon-clair: #7FC4C9;
  --ambre: #F2B134;
  --vert: #43B581;
  --ecume: #F1F5F4;
  --brume: #E3EBEA;
  --blanc: #FFFFFF;
  --encre: #13252E;
  --ardoise: #4F616A;

  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --texte: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --r-s: 6px;
  --r-m: 14px;
  --r-l: 22px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ecume);
  color: var(--encre);
  font-family: var(--texte);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--display);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5.4vw, 4.1rem); font-weight: 750; }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.65rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 650; }
p { margin: 0; }
a { color: inherit; }

:focus-visible { outline: 3px solid var(--ambre); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: 1rem; top: -3rem; z-index: 50;
  background: var(--ambre); color: var(--abysse); padding: .5rem 1rem; border-radius: var(--r-s);
}
.skip:focus { top: 1rem; }

.lead { font-size: 1.2rem; color: var(--ardoise); max-width: 36rem; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: .7rem 1.4rem;
  border-radius: 999px; border: 2px solid var(--abysse);
  background: var(--abysse); color: var(--blanc);
  font-family: var(--display); font-weight: 650; font-size: 1.02rem;
  text-decoration: none; transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--lagon); border-color: var(--lagon); }
.btn-ghost { background: transparent; color: var(--abysse); }
.btn-ghost:hover { background: var(--abysse); color: var(--blanc); border-color: var(--abysse); }
.btn-small { min-height: 2.5rem; padding: .4rem 1.1rem; font-size: .95rem; }
.btn-amber { background: var(--ambre); border-color: var(--ambre); color: var(--abysse); }
.btn-amber:hover { background: var(--blanc); border-color: var(--blanc); color: var(--abysse); }

/* En-tête */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--ecume) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--brume);
}
.topbar-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--abysse); }
.logo-mark { width: 2.1rem; height: 2.1rem; color: var(--lagon); }
.logo-core { fill: var(--ambre); }
.brand-name { font-family: var(--display); font-weight: 750; font-size: 1.4rem; letter-spacing: -0.02em; }
.nav { display: flex; gap: 1.6rem; margin-left: auto; }
.nav a { text-decoration: none; color: var(--ardoise); font-weight: 700; font-size: .98rem; }
.nav a:hover { color: var(--abysse); }
@media (max-width: 760px) {
  .nav { display: none; }
  .topbar .btn-small { margin-left: auto; }
}

/* Hero : photo de la maison en plein écran */
.hero {
  position: relative; overflow: hidden; background: var(--abysse); color: var(--blanc);
  min-height: min(88vh, 50rem, 56.25vw); display: flex; align-items: flex-end;
}
.hero-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 60% 55%;
}
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(14, 42, 58, .94) 0%, rgba(14, 42, 58, .78) 32%, rgba(14, 42, 58, .2) 62%, rgba(14, 42, 58, 0) 80%),
    linear-gradient(0deg, rgba(14, 42, 58, .55) 0%, rgba(14, 42, 58, 0) 45%);
}
.hero-inner { position: relative; width: 100%; padding-top: 6rem; padding-bottom: clamp(3rem, 8vw, 5.5rem); }
.hero-copy { max-width: 36rem; }
.hero-copy h1 { color: var(--blanc); max-width: 13ch; }
.hero-copy .lead { margin-top: 1.4rem; color: #D3E1E2; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.btn-light { background: transparent; border-color: rgba(255, 255, 255, .7); color: var(--blanc); }
.btn-light:hover { background: var(--blanc); border-color: var(--blanc); color: var(--abysse); }
@media (max-width: 760px) {
  .hero { display: block; min-height: 0; }
  .hero-photo { position: static; height: auto; aspect-ratio: 4 / 3; object-position: 68% 55%; }
  .hero-shade { display: none; }
  .hero-inner { padding-top: 2rem; padding-bottom: 3rem; }
}

/* Bandeau tablette */
.tablette-band { background: #DCD8D5; padding: clamp(3rem, 7vw, 5rem) 0; }
.tablette { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.tablette-img { margin: 0; }
.tablette-img img { display: block; width: 100%; height: auto; border-radius: var(--r-l); box-shadow: 0 24px 50px -28px rgba(14, 42, 58, .45); }
.tablette-copy h2 { color: var(--abysse); }
.tablette-copy > p { margin-top: 1rem; color: #3E4F57; font-size: 1.1rem; }
.tablette-band .ticks li::before { background: #DCD8D5; }
@media (max-width: 900px) {
  .tablette { grid-template-columns: 1fr; }
}

/* Console de scénario */
.console {
  background: var(--abysse);
  color: var(--ecume);
  border-radius: var(--r-l);
  padding: 1.4rem 1.4rem 1.2rem;
  box-shadow: 0 30px 60px -30px rgba(14, 42, 58, .55);
  border: 1px solid var(--abysse-3);
}
.console-head { display: flex; gap: .85rem; align-items: flex-start; padding-bottom: 1.1rem; border-bottom: 1px solid var(--abysse-3); }
.console-dot {
  flex: none; width: .75rem; height: .75rem; margin-top: .45rem; border-radius: 50%;
  background: var(--ambre); box-shadow: 0 0 0 4px rgba(242, 177, 52, .18);
}
.console.is-done .console-dot { background: var(--vert); box-shadow: 0 0 0 4px rgba(67, 181, 129, .2); }
.console-name { font-family: var(--display); font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.console-trigger { color: var(--lagon-clair); font-size: .95rem; margin-top: .15rem; }

.console-steps { list-style: none; margin: 0; padding: 1rem 0 .4rem; position: relative; }
.step {
  display: grid; grid-template-columns: 4.6rem 2.2rem 1fr; gap: .7rem;
  align-items: start; padding: .45rem 0; position: relative;
}
.step::before { /* fil de liaison entre les étapes */
  content: ""; position: absolute; left: calc(4.6rem + .7rem + 1.1rem - 1px); top: 2.55rem; bottom: -.5rem;
  width: 2px; background: var(--abysse-3);
}
.step:last-child::before { display: none; }
.step-time { font-size: .82rem; color: var(--lagon-clair); padding-top: .45rem; text-align: right; line-height: 1.25; }
.step-icon {
  width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--abysse-2); border: 1px solid var(--abysse-3); color: var(--lagon-clair);
  position: relative; z-index: 1;
}
.step-icon .icon { width: 1.15rem; height: 1.15rem; }
.step-text { padding-top: .35rem; line-height: 1.4; }
.step-alarme .step-icon, .step-serrure .step-icon { color: var(--ambre); }
@media (max-width: 540px) {
  .console { padding: 1.1rem 1rem 1rem; }
  .step { grid-template-columns: 3.3rem 2.2rem 1fr; gap: .55rem; }
  .step::before { left: calc(3.3rem + .55rem + 1.1rem - 1px); }
  .step-text { font-size: .98rem; }
}

.console-end {
  display: flex; align-items: center; gap: .6rem; margin-top: .6rem; padding-top: 1rem;
  border-top: 1px solid var(--abysse-3); font-family: var(--display); font-weight: 650; color: var(--vert);
}
.console-end .icon { width: 1.3rem; height: 1.3rem; }

/* Animation pas à pas (seulement si JS actif) */
.js .console.is-playing .step { opacity: .18; transition: opacity .35s ease; }
.js .console.is-playing .step.on { opacity: 1; }
.js .console.is-playing .step.now .step-icon {
  background: var(--ambre); border-color: var(--ambre); color: var(--abysse);
  box-shadow: 0 0 0 5px rgba(242, 177, 52, .2);
}
.js .console.is-playing .console-end { opacity: 0; }
.js .console .console-end { transition: opacity .4s ease; }
@media (prefers-reduced-motion: reduce) {
  .js .console.is-playing .step { opacity: 1; transition: none; }
}

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-head { max-width: 44rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { margin-top: 1rem; color: var(--ardoise); font-size: 1.12rem; }
.section-deep { background: var(--abysse); color: var(--ecume); }
.section-deep .section-head p, .section-deep .lead { color: #B9CDD0; }
.section-tint { background: var(--brume); }

/* Services */
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); }
.service { border-top: 3px solid var(--abysse); padding-top: 1.4rem; }
.service-title { display: flex; align-items: center; gap: .75rem; margin-bottom: .9rem; }
.service-icon {
  width: 2.75rem; height: 2.75rem; border-radius: var(--r-m); display: grid; place-items: center;
  background: var(--abysse); color: var(--ambre);
}
.service-icon .icon { width: 1.4rem; height: 1.4rem; }
.service h3 { font-size: 1.55rem; }
.service > p { color: var(--ardoise); }
.ticks { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: .55rem; }
.ticks li { position: relative; padding-left: 1.6rem; line-height: 1.4; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .42rem; width: .7rem; height: .7rem;
  border-radius: 50%; border: 2px solid var(--lagon); background: var(--ecume);
}
@media (max-width: 900px) { .services { grid-template-columns: 1fr; } }

.extras {
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--blanc); border-radius: var(--r-l); border: 1px solid var(--brume);
}
.extra { padding: 1.4rem 1.5rem; }
.extra + .extra { border-left: 1px solid var(--brume); }
.extra dt { font-family: var(--display); font-weight: 700; font-size: 1.1rem; color: var(--abysse); }
.extra dd { margin: .4rem 0 0; color: var(--ardoise); font-size: .98rem; line-height: 1.45; }
@media (max-width: 900px) {
  .extras { grid-template-columns: 1fr 1fr; }
  .extra:nth-child(3) { border-left: 0; }
  .extra:nth-child(n+3) { border-top: 1px solid var(--brume); }
}
@media (max-width: 540px) {
  .extras { grid-template-columns: 1fr; }
  .extra + .extra { border-left: 0; border-top: 1px solid var(--brume); }
}

/* Scénarios */
.scenarios { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.picker { display: grid; gap: .5rem; }
.pick {
  text-align: left; cursor: pointer; font: inherit; color: inherit;
  background: transparent; border: 1px solid var(--abysse-3); border-radius: var(--r-m);
  padding: .9rem 1.1rem; display: grid; gap: .15rem; transition: background .15s, border-color .15s;
}
.pick:hover { background: var(--abysse-2); }
.pick[aria-selected="true"] { background: var(--abysse-2); border-color: var(--ambre); box-shadow: inset 4px 0 0 var(--ambre); }
.pick-name { font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.pick-trigger { color: #A9C0C4; font-size: .92rem; line-height: 1.35; }
.scenario-view .console { background: var(--abysse-2); box-shadow: none; position: sticky; top: 6rem; }
.scenario-view .step-icon { background: var(--abysse); }
@media (max-width: 900px) {
  .scenarios { grid-template-columns: 1fr; }
  .picker { grid-auto-flow: column; grid-auto-columns: minmax(13rem, 1fr); overflow-x: auto; padding-bottom: .5rem; scroll-snap-type: x mandatory; }
  .pick { scroll-snap-align: start; }
  .scenario-view .console { position: static; }
}

/* Maison témoin */
.temoin { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.temoin-copy p { margin-top: 1rem; color: var(--ardoise); font-size: 1.12rem; }
.figures { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid #CBD7D6; }
.figure { display: flex; align-items: baseline; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid #CBD7D6; }
.figure:nth-child(odd) { padding-right: 1.2rem; }
.figure dt { font-family: var(--display); font-weight: 750; font-size: 2.6rem; line-height: 1; color: var(--lagon); min-width: 2.2ch; }
.figure dd { margin: 0; color: var(--encre); line-height: 1.35; }
@media (max-width: 900px) { .temoin { grid-template-columns: 1fr; } }
@media (max-width: 540px) { .figures { grid-template-columns: 1fr; } .figure:nth-child(odd) { padding-right: 0; } }

/* Méthode */
.steps-line { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2rem); position: relative; }
.steps-line li { position: relative; }
.steps-num {
  display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: var(--abysse); color: var(--ambre); font-family: var(--display); font-weight: 750; font-size: 1.15rem;
  position: relative; z-index: 1; margin-bottom: 1.1rem;
}
.steps-line li:not(:last-child)::after {
  content: ""; position: absolute; top: 1.3rem; left: 2.6rem; right: calc(-1 * clamp(1.25rem, 3vw, 2rem));
  height: 2px; background: var(--lagon); opacity: .4;
}
.steps-line h3 { margin-bottom: .5rem; }
.steps-line p { color: var(--ardoise); }
@media (max-width: 900px) {
  .steps-line { grid-template-columns: 1fr; }
  .steps-line li { padding-left: 3.8rem; }
  .steps-num { position: absolute; left: 0; top: 0; margin: 0; }
  .steps-line li:not(:last-child)::after { top: 2.6rem; bottom: calc(-1 * clamp(1.25rem, 3vw, 2rem)); left: 1.3rem; right: auto; width: 2px; height: auto; }
}

/* FAQ */
.faq-grid { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.faq details { border-bottom: 1px solid #CBD7D6; }
.faq details:first-child { border-top: 1px solid #CBD7D6; }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.15rem 2.5rem 1.15rem 0; position: relative;
  font-family: var(--display); font-weight: 650; font-size: 1.15rem; color: var(--abysse);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: .3rem; top: 50%; width: .7rem; height: .7rem; margin-top: -.5rem;
  border-right: 2px solid var(--lagon); border-bottom: 2px solid var(--lagon); transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -.15rem; }
.faq details p { padding: 0 0 1.25rem; color: var(--ardoise); max-width: 40rem; }
@media (max-width: 900px) { .faq-grid { grid-template-columns: 1fr; } }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.contact h2 { margin-bottom: 1.2rem; }
.contact-card { background: var(--abysse-2); border: 1px solid var(--abysse-3); border-radius: var(--r-l); padding: .6rem 1.6rem 1.6rem; display: grid; }
.contact-line { display: grid; gap: .1rem; padding: 1rem 0; border-bottom: 1px solid var(--abysse-3); text-decoration: none; }
.contact-label { color: var(--lagon-clair); font-size: .9rem; }
.contact-value { font-family: var(--display); font-weight: 650; font-size: 1.25rem; overflow-wrap: anywhere; }
a.contact-line:hover .contact-value { color: var(--ambre); }
.contact-card .btn { margin-top: 1.4rem; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }

/* Pied de page */
.footer { background: var(--abysse); color: #A9C0C4; border-top: 1px solid var(--abysse-3); padding: 2.2rem 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: center; justify-content: space-between; }
.footer-brand { display: flex; align-items: center; gap: .8rem; }
.footer-brand .logo-mark { color: var(--lagon-clair); }
.footer-name { font-family: var(--display); font-weight: 750; color: var(--ecume); font-size: 1.15rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--ambre); }

/* Pages de texte */
.prose { max-width: 44rem; }
.prose h1 { margin-bottom: 2rem; }
.prose h2 { font-size: 1.4rem; margin: 2rem 0 .6rem; }
.prose p { color: var(--ardoise); }
.prose a { color: var(--lagon); font-weight: 700; }

/* Bande d'engagements sous la photo */
.engagements { background: var(--abysse); color: var(--ecume); border-top: 1px solid var(--abysse-3); }
.engagements-list { list-style: none; margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.engagements-list li { padding: 1.4rem 1.25rem 1.5rem; display: grid; gap: .25rem; border-left: 1px solid var(--abysse-3); }
.engagements-list li:first-child { border-left: 0; padding-left: 0; }
.engagement-titre { font-family: var(--display); font-weight: 700; font-size: 1.08rem; color: var(--ambre); }
.engagement-texte { color: #B9CDD0; font-size: .95rem; line-height: 1.4; }
@media (max-width: 900px) {
  .engagements-list { grid-template-columns: 1fr 1fr; }
  .engagements-list li:nth-child(3) { border-left: 0; padding-left: 0; }
  .engagements-list li:nth-child(n+3) { border-top: 1px solid var(--abysse-3); }
}
@media (max-width: 540px) {
  .engagements-list { grid-template-columns: 1fr; }
  .engagements-list li { border-left: 0; padding-left: 0; }
  .engagements-list li + li { border-top: 1px solid var(--abysse-3); }
}
