/* Perfora — site d'éditeur (lots V3 et V4, docs/MAQUETTES_V4.md : habillage de v51, en-tête nuit, bouton orange). Identité : nuit #1A1F3B, violet #5B57E0, orange #F5A524.
   Police système, aucune ressource externe, aucun style en ligne (en-têtes de sécurité). */
:root {
  --nuit: #1A1F3B; --nuit-2: #262C52; --violet: #5B57E0; --violet-fonce: #3C3489; --violet-clair: #EEEDFE; --violet-moyen: #CECBF6;
  --orange: #F5A524; --texte: #1D2033; --gris: #4A4E63; --gris-leger: #8A8EA3; --trait: #E3E4EC; --fond: #F7F7FB; --blanc: #fff; --vert: #1F8A5B;
  --r: 14px; --ombre: 0 1px 2px rgba(26,31,59,.06), 0 10px 30px rgba(26,31,59,.07); --entete: 72px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* B3 : « caché » l'emporte toujours (boutons du questionnaire) */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--entete) + 12px); }
body { margin: 0; font-family: "Segoe UI", Inter, system-ui, -apple-system, Roboto, sans-serif; color: var(--texte); background: var(--blanc); line-height: 1.6; font-size: 17px; -webkit-font-smoothing: antialiased; }
body.menu-ouvert { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--violet); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .45em; letter-spacing: -.02em; color: var(--nuit); }
h1 { font-size: clamp(36px, 4.6vw, 56px); font-weight: 750; }
h2 { font-size: clamp(28px, 3.2vw, 40px); font-weight: 750; }
h3 { font-size: 20px; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.etroit { max-width: 780px; }
.centre { text-align: center; }
.centre .lead, .centre-bloc { margin-left: auto; margin-right: auto; }
.titre-moyen { font-size: clamp(30px, 3vw, 38px); }
.muted { color: var(--gris); }
.petit { font-size: 15px; }
section { padding: 96px 0; }
section.serre { padding: 56px 0; }
section.haut-serre { padding-top: 24px; }
.fond { background: var(--fond); }
.surtitre { text-transform: uppercase; letter-spacing: .09em; font-size: 13px; font-weight: 650; color: var(--violet); margin-bottom: 14px; }
.lead { font-size: 20px; color: var(--gris); max-width: 640px; }
.tete-section { margin-bottom: 44px; }

/* boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 24px; border-radius: 11px; font: inherit; font-size: 16px; font-weight: 650; text-decoration: none; border: 1px solid var(--trait); color: var(--nuit); background: var(--blanc); cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: var(--violet); }
.btn.principal { background: var(--orange); border-color: var(--orange); color: var(--nuit); }
.btn.principal:hover { background: #E8951A; border-color: #E8951A; }
.btn.violet { background: var(--violet); border-color: var(--violet); color: #fff; }
.btn.violet:hover { background: var(--violet-fonce); }
.btn.contour { background: transparent; border-color: var(--violet); color: var(--violet); }
.btn.clair { background: transparent; border-color: rgba(255,255,255,.4); color: #fff; }
.btn.petit { padding: 10px 16px; font-size: 15px; }
.btn.bloc { width: 100%; }
.lien-fleche { font-weight: 650; }
.lien-fleche::after { content: " →"; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin: 30px 0 14px; }
.centre-actions { justify-content: center; }

/* en-tête */
.entete { position: sticky; top: 0; z-index: 40; background: var(--nuit); border-bottom: 1px solid rgba(255,255,255,.08); }
.entete .wrap { display: flex; align-items: center; gap: 32px; height: var(--entete); }
.entete .marque { color: #fff; }
.marque { display: inline-flex; align-items: center; gap: 10px; color: var(--nuit); font-weight: 750; font-size: 23px; letter-spacing: -.02em; white-space: nowrap; }
.marque:hover { text-decoration: none; }
.marque img { width: 34px; height: 34px; }
.marque i { color: var(--orange); font-style: normal; }
.nav { display: flex; gap: 28px; }
.nav a { color: #D5D3F5; font-weight: 550; font-size: 16px; white-space: nowrap; }
.nav a:hover, .nav a[aria-current] { color: #fff; text-decoration: none; }
.nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--orange); padding-bottom: 4px; }
.entete .droite { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.entete .connexion { color: #D5D3F5; font-size: 16px; font-weight: 550; white-space: nowrap; }
.entete .connexion:hover { color: #fff; }
.menu-btn { display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.3); border-radius: 10px; background: transparent; align-items: center; justify-content: center; cursor: pointer; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 18px; height: 2px; background: #fff; border-radius: 2px; position: relative; content: ""; transition: transform .2s; }
.menu-btn span::before { position: absolute; top: -6px; }
.menu-btn span::after { position: absolute; top: 6px; }
.entete.ouvert .menu-btn span { background: transparent; }
.entete.ouvert .menu-btn span::before { top: 0; transform: rotate(45deg); }
.entete.ouvert .menu-btn span::after { top: 0; transform: rotate(-45deg); }

/* héros */
.heros { background: var(--nuit); color: #fff; padding: 76px 0 84px; overflow: hidden; }
.heros h1 { color: #fff; max-width: 13em; font-size: clamp(36px, 4.2vw, 52px); }
.heros .lead { color: #CECBF6; }
.heros .surtitre { color: #AFA9EC; }
.heros .lien-fleche { color: #fff; }
.heros-grille { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.heros-visuel { width: 100%; max-width: 560px; justify-self: end; }
.preuves { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; color: #CECBF6; font-size: 16px; }
.preuves li::before { content: "✓ "; color: var(--orange); font-weight: 700; }
.heros-page { background: var(--fond); padding: 72px 0 44px; }
.heros-page h1 { max-width: 15em; }

/* frise des trois gestes */
.frise { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: geste; }
.frise li { position: relative; padding-top: 6px; }
.frise .tete { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.frise .num { width: 40px; height: 40px; border-radius: 50%; background: var(--violet); color: #fff; font-weight: 750; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.frise img { width: 40px; height: 40px; }
.frise h3 { margin: 0; }
.frise p { color: var(--gris); margin: 0 0 8px; }
.frise li:not(:last-child)::after { content: ""; position: absolute; top: 26px; left: 64px; right: -20px; height: 2px; background: repeating-linear-gradient(90deg, var(--violet-moyen) 0 6px, transparent 6px 12px); }

/* industries */
.etiquettes { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.etiquette-ind { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--violet-moyen); border-radius: 999px; padding: 7px 16px 7px 8px; color: var(--nuit); font-weight: 550; font-size: 16px; background: var(--blanc); }
.etiquette-ind:hover { text-decoration: none; border-color: var(--violet); }
.etiquette-ind img { width: 28px; height: 28px; }

/* comment démarrer : 4 étapes, ronds orange (v51) */
.demarrer { margin: 64px 0 24px; }
.etapes { counter-reset: e; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.etapes li { counter-increment: e; background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--r); padding: 22px; color: var(--gris); font-size: 16px; }
.etapes li::before { content: counter(e); display: inline-flex; width: 34px; height: 34px; border-radius: 50%; background: var(--orange); color: var(--nuit); font-weight: 750; align-items: center; justify-content: center; margin-bottom: 12px; }
.etapes b { display: block; margin-bottom: 4px; color: var(--nuit); font-size: 17px; }

/* cartes génériques */
.g2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.carte { background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--r); padding: 28px; }
.carte p:last-child { margin-bottom: 0; }
.carte.ombre { box-shadow: var(--ombre); border-color: transparent; }
.carte-ind img, .contact-carte img { width: 52px; height: 52px; background: var(--violet-clair); border-radius: 14px; padding: 6px; margin-bottom: 16px; }
.contact-carte { text-align: center; }
.contact-carte img { margin: 0 auto 16px; }
.contact-carte .btn { white-space: normal; text-align: center; }

/* offres (accueil et page Formules) : cartes de v51, « Sur devis » à la place des prix */
.formules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.formule { position: relative; display: flex; flex-direction: column; background: var(--blanc); border: 1px solid var(--trait); border-radius: 16px; padding: 28px 24px 24px; }
.formule.mise-en-avant { border: 2px solid var(--violet); box-shadow: var(--ombre); }
.formule .etiquette { position: absolute; top: -13px; left: 24px; background: var(--violet); color: #fff; font-size: 13px; font-weight: 700; padding: 3px 12px; border-radius: 999px; }
.formule h3 { font-size: 24px; margin-bottom: 2px; }
.formule .pour { color: var(--gris); font-size: 16px; margin-bottom: 14px; }
.formule .sur-devis { font-size: 28px; font-weight: 750; color: var(--nuit); letter-spacing: -.02em; margin: 0; padding-bottom: 16px; border-bottom: 1px solid var(--trait); }
.formule ul { list-style: none; padding: 0; margin: 16px 0 20px; flex: 1; }
.formule li { padding: 4px 0 4px 26px; position: relative; font-size: 16px; }
.formule li::before { content: "✓"; position: absolute; left: 0; color: var(--vert); font-weight: 700; }
.note-formules { text-align: center; color: var(--gris); margin: 26px 0 0; }
.tableau { overflow-x: auto; border: 1px solid var(--trait); border-radius: var(--r); -webkit-overflow-scrolling: touch; }
.glisser { display: none; color: var(--gris-leger); font-size: 14px; margin: 0 0 8px; }
.comparatif { width: 100%; border-collapse: collapse; background: var(--blanc); font-size: 16px; min-width: 680px; }
.comparatif th, .comparatif td { padding: 13px 14px; border-bottom: 1px solid var(--trait); text-align: center; }
.comparatif th:first-child, .comparatif td:first-child { text-align: left; position: sticky; left: 0; background: var(--blanc); }
.comparatif thead th { background: var(--fond); font-weight: 700; color: var(--nuit); }
.comparatif thead th:first-child { background: var(--fond); }
.comparatif thead th.mise-en-avant { color: var(--violet); }
.comparatif .famille td { background: var(--violet-clair); color: var(--violet-fonce); font-weight: 700; text-align: left; }
.comparatif .oui { color: var(--vert); font-weight: 700; }
.comparatif .non { color: #B4B7C6; }
.comparatif .option { color: var(--gris); font-size: 15px; }

/* FAQ */
details { border-bottom: 1px solid var(--trait); padding: 18px 0; }
summary { cursor: pointer; font-weight: 650; font-size: 18px; color: var(--nuit); }
details p { margin: 10px 0 0; color: var(--gris); }

/* appel final */
.final { background: var(--violet); color: #fff; text-align: center; }
.final h2 { color: #fff; }
.final .lead { color: #E3E1FF; margin: 0 auto; }
.final .actions { justify-content: center; }

/* pied de page */
.pied { background: var(--nuit); color: #B8B6E8; padding: 60px 0 28px; font-size: 15px; }
.pied-grille { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 28px; }
.pied h4 { color: #fff; font-size: 15px; margin: 0 0 12px; }
.pied ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pied a { color: #B8B6E8; }
.pied a:hover { color: #fff; }
.pied .marque { color: #fff; }
.pied .petit { margin-top: 14px; }
.pied-bas { border-top: 1px solid #2E3563; margin-top: 40px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 12px 24px; color: #8E8BC9; font-size: 14px; }
.pied-bas .sig { margin-left: auto; }

/* questionnaire d'essai */
.formulaire { background: var(--fond); padding: 52px 0 96px; }
.formulaire .carte { padding: 34px; }
.progression { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 24px; }
.progression.quatre { grid-template-columns: repeat(4, 1fr); }
.choix-demande { border: 0; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.carte-choix { display: flex; gap: 12px; align-items: flex-start; border: 1px solid #CDCFDB; border-radius: 12px; padding: 14px 16px; cursor: pointer; background: var(--blanc); }
.carte-choix input { margin-top: 5px; accent-color: var(--violet); }
.carte-choix b { display: block; color: var(--nuit); font-size: 17px; }
.carte-choix small { display: block; color: var(--gris); font-size: 15px; margin-top: 2px; }
.carte-choix:has(input:checked) { border-color: var(--violet); background: var(--violet-clair); box-shadow: 0 0 0 1px var(--violet); }
.progression span { height: 5px; border-radius: 3px; background: var(--trait); }
.progression span.fait { background: var(--violet); }
fieldset { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
legend, .lib { font-weight: 650; font-size: 16px; margin-bottom: 10px; padding: 0; color: var(--nuit); display: block; }
.champs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 18px; }
.champ label { display: block; font-weight: 650; font-size: 16px; margin-bottom: 6px; color: var(--nuit); }
.champ .aide { font-weight: 400; color: var(--gris-leger); font-size: 14px; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], select, textarea { width: 100%; padding: 13px 14px; border: 1px solid #CDCFDB; border-radius: 10px; font: inherit; font-size: 16px; background: var(--blanc); color: var(--texte); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--violet); outline-offset: 1px; border-color: var(--violet); }
textarea { min-height: 88px; resize: vertical; }
.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puces label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #CDCFDB; border-radius: 999px; padding: 9px 16px; cursor: pointer; background: var(--blanc); }
.puces input { accent-color: var(--violet); margin: 0; }
.puces label:has(input:checked) { border-color: var(--violet); background: var(--violet-clair); color: var(--violet-fonce); font-weight: 650; }
.plein { grid-column: 1 / -1; }
.option-essai { display: flex; gap: 10px; align-items: flex-start; background: var(--violet-clair); border-radius: 10px; padding: 14px 16px; color: var(--violet-fonce); font-size: 15px; cursor: pointer; }
.option-essai input { margin-top: 4px; accent-color: var(--violet); }
.consentement { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--gris); }
.consentement input { margin-top: 5px; accent-color: var(--violet); }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.actions-form { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.erreur { color: #B42318; font-size: 15px; margin: 10px 0 0; }
.merci { text-align: center; padding: 16px 0; }
.merci .rond { width: 60px; height: 60px; border-radius: 50%; background: #E3F4EC; color: var(--vert); display: inline-flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; margin-bottom: 12px; }
.sansjs { background: #FFF6E5; border: 1px solid #F5D8A0; border-radius: 10px; padding: 12px 16px; margin-bottom: 18px; }
.js .sansjs { display: none; }
.etape { padding: 0; }
.cote-essai { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; }
.cote-essai .rappel { position: sticky; top: calc(var(--entete) + 20px); }
.liste-etapes { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 16px; }
.liste-etapes li { display: flex; gap: 14px; align-items: flex-start; }
.liste-etapes img { width: 40px; height: 40px; background: var(--violet-clair); border-radius: 10px; padding: 4px; flex: none; }
.liste-etapes b { display: block; color: var(--nuit); }
.liste-etapes span { color: var(--gris); font-size: 16px; }

/* mentions */
.legal { padding: 52px 24px 76px; max-width: 828px; margin: 0 auto; }
.legal h2 { font-size: 24px; margin-top: 28px; }
.todo { background: #FFF6E5; border-bottom: 1px dashed var(--orange); padding: 0 4px; }

/* bouton fixe sur téléphone : visible seulement après le héros (site.js) */
.collant { display: none; }

@media (max-width: 1020px) {
  .heros-grille, .cote-essai, .g2 { grid-template-columns: minmax(0, 1fr); }
  .heros-visuel { justify-self: center; max-width: 440px; }
  .formules, .etapes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entete .wrap { gap: 22px; }
  .nav { gap: 20px; }
  .pied-grille { grid-template-columns: 1fr 1fr; }
  .cote-essai .rappel { position: static; }
}
@media (max-width: 760px) {
  :root { --entete: 64px; }
  body { font-size: 16px; }
  section { padding: 64px 0; }
  section.serre { padding: 40px 0; }
  .lead { font-size: 18px; }
  h1 { font-size: 36px; }
  .heros { padding: 44px 0 40px; }
  .heros .actions { flex-direction: column; align-items: stretch; gap: 14px; margin-top: 24px; }
  .heros-visuel { max-width: 300px; margin-top: 8px; }
  .preuves { margin-top: 24px; flex-direction: column; gap: 6px; }
  /* B2 : menu en panneau plein écran (fond nuit, comme l'en-tête) */
  .nav, .entete .droite { display: none; }
  .menu-btn { display: inline-flex; }
  .entete.ouvert .wrap { flex-wrap: wrap; height: auto; min-height: var(--entete); }
  .entete.ouvert { position: fixed; inset: 0; overflow-y: auto; }
  .entete.ouvert .nav { display: flex; flex-direction: column; width: 100%; gap: 6px; padding: 18px 0 10px; }
  .entete.ouvert .nav a { font-size: 24px; font-weight: 650; color: #fff; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.12); box-shadow: none; }
  .entete.ouvert .droite { display: flex; flex-direction: column; align-items: stretch; width: 100%; margin: 12px 0 24px; gap: 14px; }
  .entete.ouvert .droite .connexion { font-size: 18px; }
  .entete.ouvert .droite .btn { padding: 15px; font-size: 17px; }
  .frise { grid-template-columns: 1fr; gap: 22px; }
  .frise li:not(:last-child)::after { top: 52px; bottom: -20px; left: 19px; right: auto; width: 2px; height: auto; background: repeating-linear-gradient(180deg, var(--violet-moyen) 0 6px, transparent 6px 12px); }
  .frise li { padding-left: 0; }
  .glisser { display: block; }
  .formules, .g3, .champs, .etapes { grid-template-columns: minmax(0, 1fr); }
  .demarrer { margin-top: 48px; }
  .collant { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30; box-shadow: 0 8px 24px rgba(0,0,0,.25); transform: translateY(140%); transition: transform .25s; display: flex; }
  body.collant-visible .collant { transform: none; }
  body.collant-visible { padding-bottom: 84px; }
  .pied-bas .sig { margin-left: 0; }
}
