/* Page d'accueil : en-tête, scène du simulateur, sections */

/* En-tête */
.entete { position: relative; z-index: 20; background: var(--blanc); }
.entete .page { display: flex; align-items: center; gap: var(--e-6); min-height: 88px; }
.logo img { width: 126px; height: auto; }
.nav { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 36px); margin-right: 64px; flex: 1; }
.nav a { color: var(--encre); text-decoration: none; white-space: nowrap; padding: 8px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-color: var(--bleu); color: var(--bleu); }
.langue { display: flex; gap: 6px; align-items: center; font-size: var(--t-xs); }
.onglet-contact {
  position: fixed; z-index: 30; top: 0; right: 30px; width: 46px; padding: 16px 0 18px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  background: var(--sable); color: var(--encre); border-radius: 0 0 var(--r-l) var(--r-l);
  font: 700 var(--t-xs) var(--display); letter-spacing: .02em; text-decoration: none;
  box-shadow: 0 6px 16px -6px rgb(34 40 47 / 35%);
  transition: background-color .2s, color .2s;
}
.onglet-contact:hover { background: var(--bleu); color: var(--blanc); }
.onglet-contact svg { width: 22px; height: 22px; }
.onglet-contact span { writing-mode: vertical-rl; transform: rotate(180deg); }
.menu-mobile { display: none; }

/* Scène du simulateur */
.scene {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: max(740px, calc(100svh - 88px));
  background: var(--bleu); color: var(--blanc);
}
.scene-canvas { position: absolute; inset: 0; z-index: 0; touch-action: pan-y; cursor: grab; }
.scene-canvas:active { cursor: grabbing; }
.scene-canvas canvas { display: block; width: 100% !important; height: 100% !important; }
.scene-repli { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; padding-left: 460px; }
.scene-repli svg { width: min(620px, 80%); height: auto; overflow: visible; }
.sans-webgl .scene-repli { display: flex; }

.scene::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0;
  background:
    linear-gradient(90deg, rgb(0 74 133 / 94%) 0, rgb(0 74 133 / 86%) 500px, rgb(0 74 133 / 0%) 700px),
    linear-gradient(0deg, rgb(0 74 133 / 92%) 0, rgb(0 74 133 / 0%) 170px);
  transition: opacity .6s;
}
.scene[data-vue="interieur"]::after { opacity: 1; }
@media (min-width: 961px) {
  .scene[data-vue="plan"]::after {
    opacity: 1;
    background:
      linear-gradient(90deg, var(--bleu) 0, var(--bleu) 510px, rgb(0 95 169 / 0%) 600px),
      linear-gradient(0deg, var(--bleu) 0, var(--bleu) 90px, rgb(0 95 169 / 0%) 130px);
  }
}
.sur-bleu .panneau :focus-visible { outline-color: var(--bleu); }
.scene[data-vue="interieur"] .resultat dt { color: var(--blanc); }
.scene[data-vue="interieur"] .structure { background: rgb(0 74 133 / 88%); padding: 4px 12px; border-radius: 999px; }
.sim-colonne {
  position: relative; z-index: 3; display: flex; flex-direction: column; gap: var(--e-4);
  width: 420px; margin-left: max(var(--gouttiere), calc((100vw - 1312px) / 2));
  padding-block: var(--e-5);
  pointer-events: none;
}
.sim-colonne > * { pointer-events: auto; }
.sim-colonne h1 { color: var(--blanc); font-size: clamp(2.125rem, 1.5rem + 1.7vw, 2.75rem); line-height: 1.04; }

.panneau {
  display: flex; flex-direction: column;
  background: var(--blanc); color: var(--texte);
  border-radius: var(--r-l); box-shadow: var(--ombre-panneau);
  padding: var(--e-5);
}
.etapes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: var(--e-4); }
.etapes button {
  appearance: none; background: none; border: 0; padding: 0 0 8px; text-align: left; cursor: pointer;
  font: 500 var(--t-xs) var(--display); color: var(--texte-doux);
  border-bottom: 3px solid var(--sable-fort); transition: color .2s, border-color .2s;
}
.etapes button:disabled { cursor: default; }
.etapes [data-etat="fait"] button { color: var(--bleu); border-color: var(--bleu); }
.etapes [data-etat="fait"] button:hover { color: var(--bleu-fonce); }
.etapes [aria-current] button { color: var(--encre); border-color: var(--bleu); font-weight: 700; }

.etape { display: none; flex-direction: column; gap: var(--e-4); }
.etape[data-active] { display: flex; animation: entree .35s var(--ease); }
@keyframes entree { from { opacity: 0; transform: translateY(6px); } }
.etape h2 { font-size: var(--t-l); outline: none; font-weight: 700; line-height: 1.15; }
.etape-note { font-size: var(--t-xs); line-height: 1.35; color: var(--texte-doux); }
.etape-note a { color: var(--bleu); }
.grille-coches { display: grid; grid-template-columns: 1fr 1fr; gap: 10px var(--e-3); font-size: var(--t-s); }
.grille-champs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px var(--e-3); align-items: start; }
.grille-champs .large { grid-column: 1 / -1; }
.panneau-actions { display: flex; align-items: center; justify-content: space-between; gap: var(--e-2); margin-top: var(--e-1); }
.panneau-actions .btn-plein { flex: 1; }
.rgpd { font-size: var(--t-xs); line-height: 1.3; color: var(--texte-doux); }
.rgpd a { color: var(--bleu); }
.coche-petite { font-size: var(--t-xs); color: var(--texte-doux); }
.coche-petite input { width: 18px; height: 18px; }

.confirmation { display: grid; gap: var(--e-3); }
.confirmation h2 { font-size: var(--t-l); outline: none; }
.confirmation dl { display: grid; grid-template-columns: auto 1fr; gap: 2px var(--e-3); background: var(--sable); border-radius: var(--r-m); padding: var(--e-3) var(--e-4); }
.confirmation dt { color: var(--texte-doux); }
.confirmation dd { color: var(--encre); font-weight: 500; }
.maquette-note { font-size: var(--t-xs); color: var(--texte-doux); }

/* Superpositions de scène */
.vues {
  position: absolute; z-index: 3; top: var(--e-5); right: 96px;
  display: flex; gap: 2px; padding: 4px; background: rgb(0 50 92 / 55%); border-radius: var(--r-pilule);
}
.vues button {
  appearance: none; border: 0; background: none; color: var(--blanc); cursor: pointer;
  font: 500 var(--t-xs) var(--display); min-height: 36px; padding: 0 16px; border-radius: var(--r-pilule);
  transition: background-color .2s, color .2s;
}
.vues button:hover { background: rgb(255 255 255 / 16%); }
.vues button[aria-pressed="true"] { background: var(--blanc); color: var(--bleu); }
.structure {
  position: absolute; z-index: 3; top: 76px; right: 96px;
  display: flex; align-items: center; gap: 8px; color: var(--blanc); font-size: var(--t-xs); cursor: pointer;
}
.structure input { width: 18px; height: 18px; margin: 0; accent-color: var(--blanc); }

.poignees { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.poignee {
  position: absolute; left: 0; top: 0; width: 44px; height: 44px; margin: -22px 0 0 -22px; padding: 0;
  display: grid; place-items: center; touch-action: none; pointer-events: auto; cursor: grab;
  background: none; border: 0; will-change: transform;
}
.poignee::before {
  content: ""; width: 26px; height: 26px; border-radius: 50%;
  background: var(--blanc); box-shadow: 0 3px 10px rgb(0 28 56 / 45%), inset 0 0 0 7px var(--blanc), inset 0 0 0 10px var(--bleu);
  transition: transform .2s var(--ease);
}
.poignee:hover::before, .poignee:active::before { transform: scale(1.22); }
.poignee:active { cursor: grabbing; }
.poignee[hidden], .etiquette[hidden] { display: none; }
.etiquette {
  position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform;
  font: 700 var(--t-m) var(--display); color: var(--blanc); white-space: nowrap; font-variant-numeric: tabular-nums;
  padding: 1px 8px; background: var(--bleu); border-radius: var(--r-s);
  text-shadow: none;
}
.etiquette.sur-toile { background: var(--encre); }

.resultat {
  position: absolute; z-index: 2; bottom: var(--e-5);
  left: calc(max(var(--gouttiere), calc((100vw - 1312px) / 2)) + 420px + 32px); right: var(--e-5);
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--e-2) var(--e-6);
  pointer-events: none;
}
.resultat div { display: grid; gap: 0; }
.resultat dt { font-size: var(--t-xs); color: var(--ciel-texte); }
.resultat dd { font: 700 var(--t-m) var(--display); color: var(--blanc); font-variant-numeric: tabular-nums; line-height: 1.25; }
.resultat .fort dd { font-size: var(--t-xl); line-height: 1.05; letter-spacing: -.02em; }

/* Sections */
.section { padding-block: clamp(64px, 8vw, 112px); }

.domaines-tete { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--e-4) var(--e-7); margin-bottom: var(--e-6); }
.domaines-tete p { max-width: 52ch; font-size: var(--t-m); line-height: 1.45; }
.mosaique { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: minmax(150px, 13.5vw); gap: var(--e-4); }
.tuile { position: relative; overflow: hidden; border-radius: var(--r-l); background: var(--encre); color: var(--blanc); isolation: isolate; display: flex; align-items: flex-end; text-decoration: none; }
.tuile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .8s var(--ease); }
.tuile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgb(16 22 30 / 88%) 0%, rgb(16 22 30 / 42%) 42%, rgb(16 22 30 / 0%) 72%); }
.tuile:hover img { transform: scale(1.04); }
.tuile-corps { padding: var(--e-5); display: grid; gap: var(--e-3); justify-items: start; width: 100%; }
.tuile h3 { color: var(--blanc); }
.tuile p { font-size: var(--t-s); line-height: 1.35; max-width: 44ch; }
.tuile-liens { display: flex; flex-wrap: wrap; gap: var(--e-2) var(--e-4); align-items: center; }
.tuile-liens a:not(.btn) { color: var(--blanc); }
.tuile .btn { min-height: 40px; padding: 6px 16px; }
.t-agri { grid-column: span 7; grid-row: span 3; }
.t-btp { grid-column: span 5; grid-row: span 2; }
.t-indus { grid-column: span 5; grid-row: span 3; }
.t-spec { grid-column: span 4; grid-row: span 2; }
.t-def { grid-column: span 3; grid-row: span 2; }
.t-agri h3 { font-size: var(--t-xl); font-weight: 700; }

/* Chiffres clés */
.chiffres-bande, .contact { background-color: var(--bleu); background-image: linear-gradient(rgb(255 255 255 / 9%) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 9%) 1px, transparent 1px); background-size: 48px 48px; }
.chiffres-bande { color: var(--blanc); padding-block: var(--e-8); }
.chiffres-bande h2 { color: var(--blanc); margin-bottom: var(--e-7); }
.regle { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgb(255 255 255 / 70%); }
.regle li { position: relative; padding: var(--e-4) var(--e-4) 0 0; }
.regle li::before { content: ""; position: absolute; left: 0; top: -9px; height: 17px; width: 1px; background: var(--blanc); }
.regle strong { display: block; font: 700 clamp(2rem, 1.2rem + 2.4vw, 3.25rem) / 1.05 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.regle span { color: var(--blanc); font-size: var(--t-m); }
.regle li:not(:first-child) { padding-left: var(--e-4); }

/* Coupe technique */
.coupe { background: var(--sable); }
.coupe-grille { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--e-7) clamp(32px, 5vw, 80px); align-items: center; }
.coupe h2 { margin-bottom: var(--e-3); }
.coupe-intro { font-size: var(--t-m); line-height: 1.45; margin-bottom: var(--e-6); max-width: 54ch; }
.coupe svg { width: 100%; height: auto; overflow: visible; }
.specs { display: grid; gap: 0; border-top: 1px solid var(--sable-fort); }
.specs > div { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 0 var(--e-2); padding-block: var(--e-3); border-bottom: 1px solid var(--sable-fort); }
.specs b { display: grid; place-items: center; width: 24px; height: 24px; margin-top: 2px; background: var(--bleu); color: var(--blanc); border-radius: 50%; font: 700 .8125rem var(--display); }
.specs dt { font-weight: 500; color: var(--encre); grid-column: 2; }
.specs dd { grid-column: 2; font-size: var(--t-s); line-height: 1.4; }

/* Après votre demande */
.parcours-liste { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: var(--e-6); border-top: 3px solid var(--bleu); }
.parcours-liste li { position: relative; padding: var(--e-5) var(--e-5) 0 0; }
.parcours-liste li::before { content: ""; position: absolute; top: -9px; left: 0; width: 15px; height: 15px; border-radius: 50%; background: var(--blanc); border: 3px solid var(--bleu); }
.parcours-liste h3 { margin-bottom: var(--e-2); font-size: var(--t-m); font-weight: 700; }
.parcours-liste p { font-size: var(--t-s); line-height: 1.4; max-width: 30ch; }
.parcours-delai { display: block; margin-top: var(--e-2); color: var(--bleu); font: 700 var(--t-s) var(--display); }

/* Métier */
.metier { position: relative; display: grid; min-height: 520px; align-items: end; isolation: isolate; color: var(--blanc); }
.metier img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.metier-carte { background: var(--blanc); color: var(--texte); border-radius: var(--r-l) var(--r-l) 0 0; padding: var(--e-7) clamp(24px, 4vw, 64px); max-width: 780px; margin-inline: auto; display: grid; gap: var(--e-4); justify-items: start; font-size: var(--t-m); line-height: 1.45; }

/* Témoignage */
.temoignage { background: var(--ciel); }
.temoignage-grille { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--e-7) clamp(32px, 5vw, 80px); align-items: center; }
.temoignage img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-l); }
.temoignage blockquote { font: 500 clamp(1.375rem, 1.1rem + 1.1vw, 2rem) / 1.28 var(--display); color: var(--encre); letter-spacing: -.01em; margin-block: var(--e-5); }
.temoignage figcaption { color: var(--encre); line-height: 1.35; margin-bottom: var(--e-5); }
.temoignage figcaption b { display: block; font-family: var(--display); }

/* Articles */
.articles-tete { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: var(--e-4); margin-bottom: var(--e-6); }
.articles { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--e-4) var(--e-5); }
.article-une { position: relative; display: grid; align-content: end; gap: var(--e-2); min-height: 420px; padding: var(--e-5); background: var(--encre); color: var(--blanc); border-radius: var(--r-l); overflow: hidden; isolation: isolate; text-decoration: none; }
.article-une img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.article-une::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgb(16 22 30 / 90%), rgb(16 22 30 / 8%) 62%); }
.article-une h3 { color: var(--blanc); font-size: var(--t-l); }
.articles-liste { display: grid; align-content: start; }
.articles-liste a { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--e-4); padding-block: var(--e-4); border-bottom: 1px solid var(--sable-fort); text-decoration: none; align-items: center; color: var(--encre); }
.articles-liste a:first-child { padding-top: 0; }
.articles-liste img { width: 96px; height: 72px; object-fit: cover; border-radius: var(--r-m); }
.articles-liste h3 { font-size: var(--t-m); }
.articles-liste a:hover h3 { color: var(--bleu); }

/* Contact */
.contact { color: var(--blanc); }
.contact-grille { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--e-6) var(--e-8); align-items: end; }
.contact h2 { color: var(--blanc); font-size: var(--t-2xl); margin-bottom: var(--e-4); }
.contact p { font-size: var(--t-m); line-height: 1.45; max-width: 52ch; }
.contact-actions { display: grid; gap: var(--e-3); justify-items: start; }
.contact-tel { font: 700 var(--t-xl) var(--display); color: var(--blanc); text-decoration: none; font-variant-numeric: tabular-nums; }
.contact-tel:hover { text-decoration: underline; }

/* Pied de page */
.pied { background: var(--encre); color: var(--blanc); padding-block: var(--e-8) var(--e-6); }
.pied-grille { display: grid; grid-template-columns: minmax(0, 5fr) repeat(2, minmax(0, 3fr)); gap: var(--e-6); padding-bottom: var(--e-6); border-bottom: 1px solid rgb(255 255 255 / 25%); }
.pied-marque { font: 500 var(--t-l) / 1.25 var(--display); }
.pied img { width: 126px; filter: brightness(0) invert(1); margin-bottom: var(--e-4); }
.pied h2 { font-size: var(--t-s); color: var(--ciel-texte); font-weight: 500; letter-spacing: 0; margin-bottom: var(--e-3); }
.pied ul { display: grid; gap: 6px; }
.pied a { text-decoration: none; }
.pied a:hover { text-decoration: underline; }
.pied-bas { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--e-3) var(--e-6); padding-top: var(--e-5); font-size: var(--t-xs); color: var(--ciel-texte); }

/* Adaptation */
@media (max-height: 800px) and (min-width: 961px) {
  .sim-colonne { gap: var(--e-3); padding-block: var(--e-4); }
  .panneau { padding: var(--e-4) var(--e-5); }
}
@media (max-width: 1180px) {
  .nav { display: none; }
  .entete .page { justify-content: space-between; padding-right: 64px; }
  .menu-mobile { display: block; position: relative; }
  .menu-mobile summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 44px; height: 44px; color: var(--encre); }
  .menu-mobile summary::-webkit-details-marker { display: none; }
  .menu-mobile ul { position: absolute; right: 0; top: 48px; z-index: 40; width: 260px; padding: var(--e-3) var(--e-4); background: var(--blanc); border-radius: var(--r-m); box-shadow: var(--ombre-panneau); }
  .menu-mobile a { display: block; padding: 10px 0; color: var(--encre); text-decoration: none; }
  .langue { display: none; }
}
@media (max-width: 960px) {
  .scene { display: flex; flex-direction: column; min-height: 0; overflow: visible; }
  .entete .page { min-height: 64px; }
  .logo img { width: 100px; }
  .scene-canvas { position: sticky; top: 0; order: 2; height: 34svh; min-height: 264px; z-index: 1; }
  .poignees { position: sticky; order: 2; top: 0; height: 34svh; min-height: 264px; margin-top: calc(-1 * max(34svh, 264px)); inset: auto; width: 100%; }
  .scene::after { display: none; }
  .sim-colonne { display: contents; }
  .sim-colonne h1 { order: 0; padding: var(--e-5) var(--gouttiere) var(--e-2); }
  .vues { order: 3; position: relative; top: auto; right: auto; align-self: center; margin-block: -48px var(--e-3); z-index: 3; }
  .structure { display: none; }
  .resultat { order: 6; position: relative; inset: auto; padding: var(--e-5) var(--gouttiere); gap: var(--e-3) var(--e-5); z-index: 5; background: var(--bleu); }
  .resultat .fort dd { font-size: var(--t-l); }
  .panneau { order: 5; position: relative; z-index: 4; border-radius: var(--r-l) var(--r-l) 0 0; padding: var(--e-5) var(--gouttiere); box-shadow: 0 -10px 30px -10px rgb(0 28 56 / 40%); }
  .scene-repli { padding-left: 0; }
  .onglet-contact { right: 16px; transform: scale(.86); transform-origin: top right; }
  .mosaique { grid-auto-rows: auto; }
  .tuile { min-height: 300px; grid-row: auto !important; grid-column: 1 / -1 !important; }
  .regle { grid-template-columns: 1fr 1fr; border-top: 0; gap: var(--e-5) 0; }
  .regle li { border-top: 1px solid rgb(255 255 255 / 70%); padding-left: 0 !important; }
  .regle li::before { top: -9px; }
  .coupe-grille, .temoignage-grille, .contact-grille, .articles { grid-template-columns: minmax(0, 1fr); }
  .temoignage img { aspect-ratio: 5 / 4; max-height: 320px; }
  .parcours-liste { grid-template-columns: 1fr; border-top: 0; border-left: 3px solid var(--bleu); margin-left: 8px; }
  .parcours-liste li { padding: 0 0 var(--e-5) var(--e-5); }
  .parcours-liste li::before { left: -9px; top: 2px; }
  .parcours-liste p { max-width: none; }
  .pied-grille { grid-template-columns: 1fr 1fr; }
  .pied-grille > :first-child { grid-column: 1 / -1; }
  .metier { min-height: 440px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
