:root {
  --nuit: #060447;
  --braise: #ED8115;
  --papier: #FFFAF4;
  --sable: #F1E7D8;
  --survol: #F6EDE0;
  --display: 'Bricolage Grotesque', 'Lato', sans-serif;
  --text: 'Lato', system-ui, sans-serif;
  --marge: 80px;
  --gouttiere: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--papier);
  color: var(--nuit);
  font: 18px/32px var(--text);
}
h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
a:focus-visible { outline: 3px solid var(--braise); outline-offset: 3px; }
strong { font-weight: 700; }

/* Grille de 12 colonnes */
.g {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gouttiere);
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--marge);
}
.full { grid-column: 1 / -1; }
.half { grid-column: span 6; }
.span-7 { grid-column: 1 / 8; }
.span-8 { grid-column: 1 / 9; }
.span-10 { grid-column: 1 / 11; }
.measure { max-width: 68ch; }
.pad-m { padding-block: 72px; }
.pad-l { padding-block: 96px; }
.gap-s { row-gap: 24px; }
.gap-m { row-gap: 40px; }
.ruled { border-top: 2px solid var(--nuit); }

/* Typographie */
h1 { font-size: 16px; line-height: 24px; font-weight: 700; }
h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 40px;
  line-height: 48px;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h3 { font-size: 18px; line-height: 32px; }
.display {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.11;
  letter-spacing: -0.02em;
}
.small { font-size: 16px; line-height: 24px; }
.strong { font-weight: 700; }

/* Boutons et liens */
.btn {
  display: inline-block;
  padding: 8px 24px;
  border-radius: 999px;
  background: var(--braise);
  color: var(--nuit);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(6, 4, 71, .25); }
.btn-lg { padding: 12px 32px; font-size: 18px; }
.text-link { font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }

/* En-tête */
.site-header { background: var(--nuit); color: var(--papier); }
.topline { padding-top: 8px; font-size: 16px; line-height: 24px; }
.topline p { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0 24px; }
.nav-row { align-items: center; row-gap: 8px; padding-block: 8px 16px; }
.logo { grid-column: 1 / 4; }
.site-header nav {
  grid-column: 4 / 10;
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  font-size: 16px;
  font-weight: 700;
}
.site-header nav a { padding-block: 8px; text-decoration: none; }
.site-header nav a:hover { text-decoration: underline; }
.nav-cta { grid-column: 10 / 13; display: flex; justify-content: flex-end; }
.menu-secteurs { position: relative; }
.menu-secteurs > a { display: block; }
.sous-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: -16px;
  z-index: 10;
  min-width: 280px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background: var(--nuit);
  box-shadow: 0 16px 32px rgba(6, 4, 71, .25);
  font-weight: 400;
}
.menu-secteurs:hover .sous-menu, .menu-secteurs:focus-within .sous-menu { display: block; }
.site-header .sous-menu a { display: block; padding: 8px 16px; }

/* Accueil */
.hero { position: relative; z-index: 2; align-items: start; padding-block: 40px 56px; }
.hero-text { grid-column: 1 / 9; display: flex; flex-direction: column; gap: 24px; }
.lede { max-width: 60ch; }
.underlined { display: inline-block; position: relative; }
.underlined svg { position: absolute; left: 0; bottom: -8px; width: 100%; height: 14px; overflow: visible; }
.underlined path { fill: none; stroke: var(--braise); stroke-width: 5; stroke-linecap: round; }
.hero-art {
  grid-column: 9 / 13;
  width: 100%;
  height: auto;
  margin-bottom: -120px;
  border: 8px solid #fff;
  box-shadow: 0 16px 32px rgba(6, 4, 71, .18);
  transform: translateY(56px) rotate(2deg);
  transition: transform .4s ease;
}
.hero-art:hover { transform: translateY(48px) rotate(0deg); }

/* Bandeaux sombres */
.band-dark { background: var(--nuit); color: var(--papier); }
.band-dark .btn { color: var(--nuit); }

/* Histoire : la colonne de gauche reste vide, le texte respire */
.story-label {
  grid-column: 1 / 5;
  grid-row: 1;
  align-self: start;
  padding-top: 8px;
  border-top: 2px solid var(--nuit);
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
}
.story-text { grid-column: 5 / 12; grid-row: 1; display: flex; flex-direction: column; gap: 24px; }
.story-text p { max-width: 62ch; }

/* Services */
.service { grid-column: span 4; padding-top: 8px; border-top: 1px solid var(--nuit); }
.service { position: relative; }
/* Un seul lien dans le titre : toute la carte est cliquable */
.service h3 a:only-child::after { content: ''; position: absolute; inset: 0; }
.service h3 a { text-underline-offset: 4px; }
.service.carte { grid-column: span 3; }
.service svg {
  display: block;
  width: 32px;
  height: 32px;
  margin-block: 8px;
  fill: none;
  stroke: var(--nuit);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Pages secteur : photo plus large, et ce que les clients tapent sur Google */
.hero-secteur .hero-text { grid-column: 1 / 8; }
.hero-secteur .hero-art { grid-column: 8 / 13; }
.hero-liste .hero-text { grid-column: 1 / 11; }
/* Largeur fixe : le texte en dessous ne bouge pas pendant la frappe */
.recherche {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 440px;
  padding: 8px 24px;
  border: 1px solid var(--nuit);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(6, 4, 71, .08);
  font-size: 16px;
  line-height: 24px;
}
/* Une longue question reste lisible : le début glisse à gauche pendant qu'on tape */
.recherche-texte { display: flex; justify-content: flex-end; min-width: 0; overflow: hidden; white-space: pre; }
.anim .recherche-texte::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 18px;
  margin-left: 2px;
  background: var(--nuit);
  vertical-align: text-bottom;
  animation: curseur 1s steps(1) infinite;
}
@keyframes curseur { 50% { opacity: 0; } }
.recherche svg {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--nuit);
  stroke-width: 2;
  stroke-linecap: round;
}
.vecu { grid-column: span 6; padding-top: 8px; border-top: 1px solid var(--nuit); }

/* Secteurs : priorités 1, 2 et 3 */
.sector { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
/* Toute la carte est cliquable quand le titre porte un lien */
.sector h3 a { text-decoration: none; }
.sector h3 a::after { content: ''; position: absolute; inset: 0; }
.sector:hover h3 a { text-decoration: underline; }
.sector:hover .ph img { transform: scale(1.04); }
.sector.main { grid-column: span 6; }
.sector.main h3 { font-family: var(--display); font-size: 24px; }
.sector-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 4fr 3fr 3fr;
  gap: 32px var(--gouttiere);
}
.ph { overflow: hidden; }
.ph img { width: 100%; height: 192px; object-fit: cover; transition: transform .5s ease; }
.sector.main .ph img { height: 336px; }
.ph:hover img { transform: scale(1.04); }

/* Packs */
.packs-intro { margin-block: 16px 32px; }
.pack {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  row-gap: 8px;
  padding-block: 24px;
  border-top: 1px solid var(--nuit);
  transition: background-color .2s ease;
}
.pack:hover { background-color: var(--survol); }
.pack.first { border-top-width: 2px; }
.pack.last { border-bottom: 2px solid var(--nuit); }
.pack.featured + .pack { border-top: 0; }
.pack-name { grid-column: 1 / 4; }
.pack-name p, .ideal { font-size: 16px; line-height: 24px; }
.price {
  grid-column: 4 / 6;
  font-family: var(--display);
  font-weight: 700;
  font-size: 40px;
  line-height: 48px;
  white-space: nowrap;
}
.price .unite { display: block; font-family: var(--text); font-size: 16px; line-height: 24px; font-weight: 400; letter-spacing: 0; white-space: normal; }
.pack > .placeholder { grid-column: 4 / 6; align-self: start; padding: 8px; }
.pack-detail { grid-column: 6 / 13; display: flex; flex-direction: column; gap: 8px; }
.inclus { margin: 0; padding: 0 0 0 20px; }
.inclus li + li { margin-top: 4px; }
.inclus li::marker { color: var(--braise); }
.inclus sup { font-size: 12px; line-height: 0; }
.pack.featured {
  margin-block: 16px;
  border: 0;
  background: var(--nuit);
  color: var(--papier);
  box-shadow: 0 0 0 16px var(--nuit);
}
.badge {
  display: inline-block;
  margin-left: 8px;
  padding: 0 8px;
  background: var(--braise);
  color: var(--nuit);
  font-size: 14px;
  line-height: 24px;
}
.packs-note { grid-column: 1 / 6; align-self: center; padding-top: 24px; font-size: 16px; line-height: 24px; }
.packs-cta { grid-column: 6 / 13; display: flex; justify-content: flex-end; padding-top: 24px; }

.placeholder { padding: 24px; background: var(--sable); font-size: 16px; line-height: 24px; }

/* Contact */
.contact-infos { grid-column: 1 / 6; display: flex; flex-direction: column; gap: 24px; }
.contact-form { grid-column: 7 / 13; display: flex; flex-direction: column; gap: 8px; }
.contact-form > p:first-of-type { margin-bottom: 16px; }
.contact-form .actions { margin-block: 16px 8px; }
.contact-form label { font-size: 16px; line-height: 24px; font-weight: 700; }
.contact-form input, .contact-form textarea, .contact-form select {
  width: 100%;
  margin-bottom: 16px;
  padding: 8px 16px;
  border: 1px solid var(--nuit);
  border-radius: 8px;
  background: #fff;
  color: var(--nuit);
  font: inherit;
}
/* La case d'accord : la case à gauche, le texte à côté, en texte normal */
.contact-form label.case { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; font-weight: 400; }
.contact-form label.case input { width: 20px; height: 20px; flex: none; margin: 2px 0 0; padding: 0; accent-color: var(--nuit); }
.contact-form input:focus-visible, .contact-form textarea:focus-visible, .contact-form select:focus-visible, .contact-form button:focus-visible {
  outline: 3px solid var(--braise);
  outline-offset: 2px;
}
.contact-form button { border: 0; font-family: inherit; cursor: pointer; }
.contact-form button:disabled { opacity: .6; cursor: wait; }
.contact-form .erreur { font-weight: 700; }
/* Champ piège anti-robots, hors de l'écran */
.piege { position: absolute; left: -9999px; }

/* Texte juridique */
.texte-legal { grid-column: 1 / 10; display: flex; flex-direction: column; gap: 16px; overflow-wrap: anywhere; }
.texte-legal h2 { margin-top: 32px; font-size: 24px; line-height: 32px; }
.texte-legal h2:first-of-type { margin-top: 16px; }
.texte-legal h3 { margin-top: 16px; }
.texte-legal ul, .texte-legal ol { margin: 0; padding-left: 24px; }
.texte-legal .a-completer { background: var(--sable); padding: 0 4px; }
/* Le tableau des cookies défile de côté sur téléphone, sans élargir la page */
.tableau-defilant { overflow-x: auto; }
.tableau-defilant table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 16px; line-height: 24px; }
.tableau-defilant th, .tableau-defilant td { padding: 8px 12px 8px 0; border-bottom: 1px solid var(--nuit); text-align: left; vertical-align: top; overflow-wrap: break-word; }
.tableau-defilant th { font-weight: 700; }
.lien-bouton { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
sup { font-size: .7em; line-height: 0; }

/* Les avis de l'accueil : les témoignages choisis, puis les avis Google */
.temoignage { margin: 0; }
.temoignage blockquote { margin: 0 0 8px; }
.temoignage figcaption { display: flex; align-items: center; gap: 12px; font-size: 16px; line-height: 24px; }
.temoignage-photo { flex: none; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.avis-google { margin-top: 24px; }

/* Page « Donner votre avis » : le compteur sous le texte, l'invitation à publier aussi sur Google */
.compteur-avis { margin: -16px 0 8px; text-align: right; }
.avis-apres { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.avis-apres[hidden] { display: none; }

/* Bandeau de consentement à la mesure d'audience (seulement quand Matomo est branché) */
.consentement {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 20;
  max-width: 560px;
  padding: 24px;
  border: 2px solid var(--papier);
  background: var(--nuit);
  color: var(--papier);
  font-size: 16px;
  line-height: 24px;
}
.consentement[hidden] { display: none; }
.consentement h2 { margin: 0 0 8px; font-size: 20px; line-height: 24px; }
.consentement a { color: inherit; }
.consentement__boutons { display: flex; gap: 16px; margin-top: 16px; }
.consentement .btn { border: 0; font-family: inherit; cursor: pointer; }

/* Pied de page */
.site-footer {
  border-top: 1px solid rgba(255, 250, 244, .4);
  background: var(--nuit);
  color: var(--papier);
  font-size: 16px;
  line-height: 24px;
}
.site-footer .g { row-gap: 16px; padding-block: 24px; }
.site-footer p { grid-column: span 4; }
.footer-links { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 0 16px; }

/* Animations : seulement si le script a activé .anim
   (donc jamais pour ceux qui demandent moins d'animations ni sans JavaScript) */
.anim .hero-art { animation: pose 2s .5s cubic-bezier(.3, .1, .2, 1) backwards; }
.anim .draw { stroke-dasharray: 1; animation: trait 1.4s 2s ease-out both; }
@keyframes pose {
  from { opacity: 0; transform: translateY(160px) rotate(14deg); }
  to { opacity: 1; transform: translateY(56px) rotate(2deg); }
}
@keyframes trait { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* Construction au scroll, pilotée par main.js :
   .b seul = bloc pas encore construit, .in = construit.
   Les trajets sont calculés dans main.js, d'après la position du bloc à l'écran. */
.anim .b { opacity: 0; }
.anim .b.in { opacity: 1; }
/* Un bloc en chemin ne doit pas allonger la page sous le pied de page */
.anim main { overflow: clip; }

/* Écran moyen : la colonne du prix devient trop étroite, il passe sous le nom de l'offre */
@media (max-width: 1199px) {
  .pack { grid-template-rows: auto auto 1fr; }
  .pack-name { grid-column: 1 / 6; grid-row: 1; }
  .price { grid-column: 1 / 6; grid-row: 2; }
  .pack > .placeholder { grid-column: 1 / 6; grid-row: 3; }
  .pack-detail { grid-column: 6 / 13; grid-row: 1 / span 3; }
}

/* Téléphone : 4 colonnes, tout s'empile */
@media (max-width: 760px) {
  :root { --marge: 16px; --gouttiere: 16px; }
  .g { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .g > *, .pack > * { grid-column: 1 / -1 !important; grid-row: auto !important; }
  .hero-art { max-width: 340px; margin: 32px 0 0; transform: rotate(1deg); }
  .hero-art:hover { transform: rotate(1deg); }
  @keyframes pose {
    from { opacity: 0; transform: translateY(80px) rotate(8deg); }
    to { opacity: 1; transform: rotate(1deg); }
  }
  .nav-cta, .packs-cta { justify-content: flex-start; }
  .menu-secteurs .sous-menu { display: none; }
  .sector-row { grid-template-columns: minmax(0, 1fr); }
  .sector.main .ph img, .ph img { height: 220px; }
  .pack.featured { box-shadow: 0 0 0 8px var(--nuit); }
}
