/* ============================================================
   Devenir Expert IA — feuille de style unique
   Charte : claire, sobre, institutionnelle. Manrope uniquement.
   ============================================================ */

:root {
  --bleu: #2563eb;
  --bleu-hover: #1d4ed8;
  --navy: #1e3a8a;
  --navy-texte: #111827;
  --blanc: #ffffff;
  --gris-clair: #f8fafc;
  --bleu-clair: #dbeafe;
  --gris-texte: #6b7280;
  --bordure: #e5e7eb;
  --vert: #10b981;

  --radius-btn: 12px;
  --radius-card: 20px;
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.05);
  --maxw: 900px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--navy-texte);
  background: var(--blanc);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p {
  margin: 0;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--bleu);
}

/* ---- Typographie commune ---- */
h1 {
  font-weight: 800;
  font-size: clamp(32px, 5.4vw, 56px);
  line-height: 1.1;
  color: var(--navy-texte);
}
h2 {
  font-weight: 700;
  font-size: clamp(25px, 3.8vw, 40px);
  line-height: 1.15;
  color: var(--navy-texte);
}
h3 {
  font-weight: 600;
  font-size: clamp(19px, 2.3vw, 26px);
  line-height: 1.25;
  color: var(--navy-texte);
}
.p {
  font-weight: 400;
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.65;
  color: var(--gris-texte);
}
.p + .p {
  margin-top: 18px;
}
.eyebrow {
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--bleu);
  margin-bottom: 14px;
}
.mention {
  font-size: 13px;
  color: var(--gris-texte);
  line-height: 1.6;
}
.fine-print {
  font-size: 14px;
  color: var(--gris-texte);
  line-height: 1.6;
  margin-top: 26px;
}

/* ---- Boutons ---- */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 22px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--bleu);
  color: var(--bleu);
  background: var(--blanc);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}
.btn-secondary:hover {
  background: var(--bleu-clair);
}
.btn-white {
  display: inline-flex;
  align-items: center;
  height: 56px;
  padding: 0 34px;
  border-radius: var(--radius-btn);
  background: var(--blanc);
  color: var(--navy);
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.btn-white:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

/* ---- Badges ---- */
.badge {
  display: inline-block;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 16px;
}
.badge-blue {
  background: var(--bleu-clair);
  color: var(--bleu);
}
.badge-light {
  background: var(--bleu-clair);
  color: var(--bleu);
}

/* icônes inline */
.ic {
  width: 18px;
  height: 18px;
  flex: none;
}

/* ============================================================
   PROPOSITION PUBLIQUE
   ============================================================ */
.proposal-body {
  background: var(--blanc);
}
.sec {
  padding: clamp(48px, 8vw, 88px) 0;
}
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(18px, 5vw, 28px);
}
.wrap.narrow {
  max-width: 760px;
}
.wrap.wide {
  max-width: 1120px;
}
.sec-white {
  background: var(--blanc);
}
.sec-grey {
  background: var(--gris-clair);
}

/* ---- reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 400ms ease, transform 400ms ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---- 01 Hero ---- */
.sec-hero {
  background: var(--navy);
  padding: clamp(64px, 12vw, 100px) 0;
  color: var(--blanc);
}
.hero-logo {
  font-weight: 800;
  font-size: clamp(18px, 2.4vw, 20px);
  color: var(--blanc);
  margin-bottom: clamp(24px, 4vw, 34px);
  letter-spacing: -0.01em;
}
.sec-hero .badge-light {
  margin-bottom: 22px;
}
.hero-title {
  color: var(--blanc);
  font-size: clamp(32px, 5.4vw, 56px);
  margin-bottom: 18px;
}
.hero-accent {
  color: var(--bleu-clair);
}
.hero-sub {
  font-size: clamp(16px, 1.6vw, 18px);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: clamp(28px, 4vw, 40px);
  max-width: 640px;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 36px;
  padding: 12px 24px 12px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
  color: var(--blanc);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 200ms ease, border-color 200ms ease, transform 200ms ease;
}
.hero-cta-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--bleu);
  color: #fff;
}
.hero-cta-ic .ic {
  width: 18px;
  height: 18px;
  animation: nudge 1.8s ease-in-out infinite;
}
@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}
@media (hover: hover) {
  .hero-cta:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
  }
}
.hero-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.hero-tile {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 14px 20px;
  font-weight: 600;
  font-size: 15px;
  color: var(--blanc);
}

/* ---- cartes génériques ---- */
.card {
  background: var(--blanc);
  border-radius: var(--radius-card);
  border: 1px solid var(--bordure);
  box-shadow: var(--shadow-card);
}
.soft-card,
.ctx-card {
  background: var(--gris-clair);
  box-shadow: none;
}

h2 + .p,
h2 + div,
.eyebrow + h2 {
  margin-top: 6px;
}
h2 {
  margin-bottom: 26px;
}

/* ---- 02 Contexte ---- */
.ctx-card {
  margin-top: 32px;
  padding: 26px 28px;
}
.ctx-label {
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gris-texte);
  margin-bottom: 14px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip {
  background: var(--bleu-clair);
  color: var(--bleu);
  font-weight: 600;
  font-size: 14px;
  padding: 7px 14px;
  border-radius: 999px;
}
.chip-muted {
  background: #eef1f5;
  color: var(--gris-texte);
}
.ctx-trigger {
  margin-top: 20px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--navy-texte);
}
.ctx-trigger span {
  font-weight: 600;
}

/* ---- 03 Tâches ---- */
.taches {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}
.tache-card {
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.2fr;
  gap: 26px;
  padding: 24px 26px;
}
.tache-col p {
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--gris-texte);
}
.tache-h {
  display: block;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--bleu);
  margin-bottom: 8px;
}
.tache-titre {
  font-weight: 600 !important;
  color: var(--navy-texte) !important;
  font-size: 16px !important;
}
.chiffrage {
  margin-top: 24px;
  background: var(--blanc);
  border: 1px solid var(--bleu);
  border-radius: 16px;
  padding: 24px 26px;
}
.chiff-ligne,
.chiff-total {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
  border-bottom: 1px solid var(--bordure);
  font-size: 16px;
  color: var(--gris-texte);
}
.chiff-ligne strong,
.chiff-total strong {
  color: var(--navy-texte);
}
.chiff-total {
  border-bottom: none;
  font-weight: 700;
  color: var(--navy-texte);
}
.chiff-total strong {
  color: var(--bleu);
}
.chiffrage .mention {
  margin-top: 14px;
}

/* ---- 04 Méthode : phases ---- */
.phases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 8px;
}
.phase {
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 30px 26px;
}
.phase-num {
  font-weight: 800;
  font-size: 48px;
  color: var(--bleu);
  line-height: 1;
  margin-bottom: 16px;
}
.phase h3 {
  margin-bottom: 12px;
}
.phase p {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--gris-texte);
}
.soft-card {
  margin-top: 24px;
  padding: 26px 28px;
  border-radius: var(--radius-card);
  border: 1px solid var(--bordure);
}
.soft-title {
  font-size: 20px;
  margin-bottom: 10px;
}
.soft-card p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--gris-texte);
}

/* ---- 05 Chantiers ---- */
.chantiers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 8px;
}
.chantier {
  padding: 28px 26px;
}
.chantier .badge {
  margin-bottom: 14px;
}
.chantier h3 {
  font-size: 22px;
  margin-bottom: 12px;
}
.chantier-constat {
  font-size: 16px;
  line-height: 1.6;
  color: var(--gris-texte);
  margin-bottom: 16px;
}
.chantier-inst {
  font-size: 16px;
  line-height: 1.6;
  color: var(--navy-texte);
}
.mini-label {
  display: block;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bleu);
  margin-bottom: 6px;
}
.chantier-outils {
  margin-top: 16px;
}
.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.badge-tool {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--gris-clair);
  border: 1px solid var(--bordure);
  color: var(--navy-texte);
  font-weight: 600;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 999px;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

/* logos d'outils dans les badges / chips */
.tool-logo {
  height: 16px;
  width: auto;
  display: block;
}
.tool-word .tool-logo {
  height: 15px;
  max-width: 84px;
}
.tool-word {
  padding: 5px 12px;
}
.chip.chip-tool {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--blanc);
  border: 1px solid var(--bordure);
  color: var(--navy-texte);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}
.chip.chip-tool .tool-logo {
  height: 16px;
}
@media (hover: hover) {
  .badge-tool:hover,
  .chip.chip-tool:hover {
    transform: translateY(-1px);
    border-color: var(--bleu);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
  }
}

/* ---- 06 Équipe ---- */
.team {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 8px;
}
.team-card {
  padding: 18px 18px 26px;
}
.team-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 18px;
}
.team-nom {
  font-weight: 700;
  font-size: 19px;
  color: var(--navy-texte);
}
.team-role {
  font-weight: 600;
  font-size: 14px;
  color: var(--bleu);
  margin: 4px 0 14px;
}
.team-bio {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--gris-texte);
}
.team-points {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.team-points li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--navy-texte);
}
.team-points .ic {
  color: var(--vert);
  margin-top: 1px;
}

/* ---- 07 Investissement ---- */
.formules {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 8px;
  align-items: stretch;
}
.formule {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}
.formule .badge {
  align-self: flex-start;
  margin-bottom: 16px;
}
.formule-reco {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--blanc);
}
.formule-reco .formule-titre,
.formule-reco .formule-accroche,
.formule-reco .formule-points li {
  color: var(--blanc);
}
.formule-reco .prix-num {
  color: var(--blanc);
}
.formule-titre {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy-texte);
}
.formule-prix {
  margin: 12px 0 16px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.prix-num {
  font-weight: 800;
  font-size: clamp(34px, 4.4vw, 40px);
  color: var(--bleu);
}
.prix-unit {
  font-size: 16px;
  font-weight: 600;
  color: inherit;
  opacity: 0.85;
}
.formule-accroche {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--gris-texte);
  margin-bottom: 18px;
}
.formule-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.formule-points li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 15px;
  color: var(--navy-texte);
}
.formule-points .ic {
  color: var(--vert);
  margin-top: 2px;
}
.formule-reco .formule-points .ic {
  color: var(--bleu-clair);
}
.bandeau {
  margin-top: 20px;
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: 14px;
  padding: 18px 24px;
  text-align: center;
  font-size: 15.5px;
  color: var(--navy-texte);
  font-weight: 500;
}
.justif {
  margin-top: 24px;
}

/* ---- 08 Financement ---- */
.fin-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 28px 0;
}
.fin-card {
  padding: 26px 24px;
  text-align: center;
}
.fin-card p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--gris-texte);
}
.fin-reco {
  border-color: var(--bleu);
}
.fin-visuel {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.fin-logo {
  max-height: 40px;
  width: auto;
}
.fin-icon {
  color: var(--bleu);
}
.fin-icon .ic {
  width: 34px;
  height: 34px;
}
.fin-nom {
  font-size: 18px;
  margin-bottom: 10px;
}

/* ---- 09 Qualiopi ---- */
.qualiopi {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  align-items: start;
}
.qualiopi-logo img {
  max-width: 260px;
  width: 100%;
}
.qualiopi-info h3 {
  margin-bottom: 14px;
}
.quali-list {
  list-style: none;
  margin: 18px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.quali-list li {
  position: relative;
  padding-left: 18px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--navy-texte);
}
.quali-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--bleu);
}
.qualiopi-info .mention {
  margin-bottom: 22px;
}

/* ---- 10 Témoignages — bandeau défilant ---- */
.sec-retours .wrap {
  margin-bottom: 34px;
}
.temoin-mq {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    #000 6%,
    #000 94%,
    transparent
  );
  mask-image: linear-gradient(
    to right,
    transparent,
    #000 6%,
    #000 94%,
    transparent
  );
}
.temoin-track {
  display: flex;
  gap: 20px;
  width: max-content;
  padding: 6px 10px;
  animation: temoin-scroll 90s linear infinite;
}
.temoin-mq:hover .temoin-track {
  animation-play-state: paused;
}
@keyframes temoin-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.temoin {
  flex: 0 0 auto;
  width: min(340px, 82vw);
  padding: 26px 24px;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.temoin-stars {
  display: flex;
  gap: 3px;
  margin-bottom: 14px;
  color: #f59e0b;
}
.ic-star {
  width: 17px;
  height: 17px;
}
.temoin-cite {
  font-weight: 400;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--navy-texte);
  margin: 0;
  quotes: none;
}
.temoin-sep {
  height: 1px;
  background: var(--bordure);
  margin: 18px 0 14px;
}
.temoin-nom {
  font-weight: 600;
  font-size: 15px;
  color: var(--navy-texte);
}
.temoin-fonction {
  font-size: 13px;
  color: var(--gris-texte);
  margin-top: 2px;
}

/* ---- 11 Objections ---- */
.accords {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}
.accord {
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: 14px;
  overflow: hidden;
}
.accord summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  font-weight: 600;
  font-size: 17px;
  color: var(--navy-texte);
}
.accord summary::-webkit-details-marker {
  display: none;
}
.accord-ic {
  color: var(--bleu);
  transition: transform 200ms ease;
  flex: none;
}
.accord[open] .accord-ic {
  transform: rotate(45deg);
}
.accord-body {
  padding: 0 24px 22px;
}
.accord-body p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--gris-texte);
}

/* ---- 12 CTA ---- */
.sec-cta {
  background: var(--navy);
  padding: 110px 0;
  text-align: center;
  color: var(--blanc);
}
.cta-title {
  color: var(--blanc);
  margin-bottom: 16px;
}
.cta-sub {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  max-width: 620px;
  margin: 0 auto 34px;
  line-height: 1.6;
}
.cta-alt {
  margin-top: 20px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

/* ---- Pied de page ---- */
.footer {
  background: var(--blanc);
  border-top: 1px solid var(--bordure);
  padding: 44px 0;
}
.footer-logo {
  font-weight: 800;
  font-size: 18px;
  color: var(--navy-texte);
  margin-bottom: 14px;
}
.footer-legal {
  font-size: 13px;
  color: var(--gris-texte);
  line-height: 1.6;
  max-width: 640px;
}
.footer-legal + .footer-legal {
  margin-top: 8px;
}
.btn-print {
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid var(--bordure);
  color: var(--gris-texte);
  border-radius: var(--radius-btn);
  padding: 10px 18px;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease;
}
.btn-print:hover {
  border-color: var(--bleu);
  color: var(--bleu);
}

/* ============================================================
   INTERFACE DE GÉNÉRATION (index)
   ============================================================ */
.app-body {
  background: var(--blanc);
  height: 100vh;
  overflow: hidden;
}
.app {
  display: grid;
  grid-template-columns: 40% 60%;
  height: 100vh;
}
.panel-left {
  background: var(--gris-clair);
  border-right: 1px solid var(--bordure);
  overflow-y: auto;
  padding: 40px;
}
.panel-right {
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
  background: var(--blanc);
}
.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}
.brand-name {
  font-weight: 800;
  font-size: 20px;
  color: var(--navy-texte);
}
.link-history {
  background: none;
  border: none;
  color: var(--bleu);
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
}
.link-history:hover {
  text-decoration: underline;
}
.panel-left h2 {
  font-size: 30px;
  line-height: 1.2;
  margin-bottom: 10px;
}
.lead {
  font-size: 16px;
  color: var(--gris-texte);
  line-height: 1.6;
  margin-bottom: 28px;
}
.field {
  margin-bottom: 22px;
}
.field label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--navy-texte);
  margin-bottom: 8px;
}
.field textarea,
.field select {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--navy-texte);
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: 12px;
  padding: 14px 16px;
  resize: vertical;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--bleu);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.field textarea.transcript {
  min-height: 320px;
  line-height: 1.55;
}
.field textarea.notes {
  min-height: 84px;
}
.field select {
  height: 48px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.hint {
  font-size: 13px;
  color: var(--gris-texte);
  margin-top: 6px;
}
.btn-primary {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: var(--radius-btn);
  background: var(--bleu);
  color: var(--blanc);
  font-family: inherit;
  font-weight: 600;
  font-size: 17px;
  cursor: pointer;
  transition: background 150ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.btn-primary:hover:not(:disabled) {
  background: var(--bleu-hover);
}
.btn-primary:disabled {
  opacity: 0.85;
  cursor: default;
}
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 999px;
  animation: spin 700ms linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.form-error {
  margin-top: 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.5;
  display: none;
}
.form-error.show {
  display: block;
}

/* aperçu */
.preview-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}
.preview-empty .ic-empty {
  color: var(--bleu-clair);
}
.preview-empty .ic-empty svg {
  width: 40px;
  height: 40px;
}
.preview-empty h3 {
  margin: 20px 0 6px;
  color: var(--navy-texte);
}
.preview-empty p {
  color: var(--gris-texte);
  font-size: 15px;
  max-width: 320px;
}
.preview-frame {
  flex: 1;
  width: 100%;
  border: none;
  display: none;
}
.preview-frame.show {
  display: block;
}

/* barre d'action */
.actionbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-top: 1px solid var(--bordure);
  background: var(--blanc);
}
.actionbar.show {
  display: flex;
}
.actionbar-client {
  font-weight: 700;
  font-size: 16px;
  color: var(--navy-texte);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.actionbar-buttons {
  display: flex;
  gap: 10px;
  flex: none;
}
.btn-sm {
  height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--bordure);
  background: var(--blanc);
  color: var(--navy-texte);
  text-decoration: none;
  transition: border-color 150ms ease, background 150ms ease;
}
.btn-sm:hover {
  border-color: var(--bleu);
  color: var(--bleu);
}
.btn-sm.primary {
  background: var(--bleu);
  border-color: var(--bleu);
  color: var(--blanc);
}
.btn-sm.primary:hover {
  background: var(--bleu-hover);
  color: var(--blanc);
}

/* modale historique */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
}
.modal-overlay.show {
  display: flex;
}
.modal {
  background: var(--blanc);
  border-radius: var(--radius-card);
  width: 100%;
  max-width: 560px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--bordure);
}
.modal-head h3 {
  font-size: 20px;
}
.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: var(--gris-texte);
  cursor: pointer;
}
.modal-list {
  overflow-y: auto;
  padding: 8px 0;
}
.modal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--bordure);
}
.modal-row:last-child {
  border-bottom: none;
}
.modal-row-info {
  min-width: 0;
}
.modal-row-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--navy-texte);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.modal-row-date {
  font-size: 13px;
  color: var(--gris-texte);
  margin-top: 2px;
}
.modal-row-actions {
  display: flex;
  gap: 8px;
  flex: none;
}
.modal-empty {
  padding: 40px 24px;
  text-align: center;
  color: var(--gris-texte);
  font-size: 15px;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy-texte);
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
  z-index: 60;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   FINANCEMENT — mécanisme en 3 étapes + note de prix
   ============================================================ */
.pay-note {
  margin-top: 16px;
  background: var(--bleu-clair);
  border-radius: 12px;
  padding: 14px 20px;
  text-align: center;
  font-size: 15px;
  line-height: 1.55;
  color: var(--navy);
  font-weight: 500;
}
.fin-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 28px 0;
}
.fin-step {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  background: var(--gris-clair);
  border: 1px solid var(--bordure);
  border-radius: 16px;
  padding: 20px 24px;
}
.fin-step-num {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--bleu);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fin-step-t {
  font-weight: 700;
  font-size: 17px;
  color: var(--navy-texte);
  margin-bottom: 4px;
}
.fin-step-d {
  font-size: 15px;
  line-height: 1.55;
  color: var(--gris-texte);
}

/* ============================================================
   INTERACTIONS — survols (hover) sur les blocs
   ============================================================ */
.card,
.tache-card,
.phase,
.chantier,
.temoin,
.team-card,
.fin-card,
.fin-step,
.formule,
.hero-tile,
.accord {
  transition: transform 200ms ease, box-shadow 200ms ease,
    border-color 200ms ease, background 200ms ease;
}
@media (hover: hover) {
  .tache-card:hover,
  .phase:hover,
  .chantier:hover,
  .temoin:hover,
  .team-card:hover,
  .fin-card:hover,
  .fin-step:hover,
  .ctx-card:hover,
  .soft-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(17, 24, 39, 0.09);
    border-color: var(--bleu-clair);
  }
  .formule:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 38px rgba(17, 24, 39, 0.12);
  }
  .fin-card:hover .fin-logo {
    transform: scale(1.04);
  }
  .fin-logo {
    transition: transform 200ms ease;
  }
  .hero-tile:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
  }
  .accord:hover {
    border-color: var(--bleu-clair);
  }
  .team-photo {
    transition: transform 300ms ease;
  }
  .team-card:hover .team-photo {
    transform: scale(1.02);
  }
}

/* accessibilité : coupe animations et survols animés si demandé */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .card,
  .tache-card,
  .phase,
  .chantier,
  .temoin,
  .team-card,
  .fin-card,
  .fin-step,
  .formule,
  .hero-tile,
  .team-photo,
  .fin-logo,
  .badge-tool,
  .chip.chip-tool {
    transition: none !important;
  }
  .tache-card:hover,
  .phase:hover,
  .chantier:hover,
  .temoin:hover,
  .team-card:hover,
  .fin-card:hover,
  .fin-step:hover,
  .formule:hover,
  .ctx-card:hover,
  .soft-card:hover,
  .badge-tool:hover,
  .chip.chip-tool:hover {
    transform: none !important;
  }
  .team-card:hover .team-photo,
  .fin-card:hover .fin-logo {
    transform: none !important;
  }
}

/* ============================================================
   BANDEAU DE LOGOS IA (marquee)
   ============================================================ */
.logo-band {
  background: var(--blanc);
  border-top: 1px solid var(--bordure);
  border-bottom: 1px solid var(--bordure);
  padding: clamp(18px, 3vw, 26px) 0;
  overflow: hidden;
}
.mq {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    #000 8%,
    #000 92%,
    transparent
  );
  mask-image: linear-gradient(
    to right,
    transparent,
    #000 8%,
    #000 92%,
    transparent
  );
}
.mq-track {
  display: flex;
  align-items: center;
  gap: clamp(34px, 6vw, 64px);
  width: max-content;
  animation: logo-scroll 42s linear infinite;
}
.mq:hover .mq-track {
  animation-play-state: paused;
}
@keyframes logo-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.mq-logo {
  display: inline-flex;
  align-items: center;
  height: clamp(22px, 3.4vw, 28px);
}
.mq-logo img {
  height: 100%;
  width: auto;
  opacity: 1;
  transition: transform 200ms ease;
}
@media (hover: hover) {
  .mq-logo:hover img {
    transform: scale(1.06);
  }
}

/* ============================================================
   ZONE D'ÉDITION INTERNE (uniquement en mode ?edit=1)
   ============================================================ */
.edit-zone {
  background: #0b1220;
  color: #e5e7eb;
  padding: clamp(32px, 6vw, 56px) 0;
  border-top: 3px solid var(--bleu);
}
.edit-head {
  margin-bottom: 22px;
}
.edit-badge {
  display: inline-block;
  background: var(--bleu);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.edit-head h3 {
  color: #fff;
  margin-bottom: 8px;
}
.edit-head p {
  color: #9ca3af;
  font-size: 14.5px;
  line-height: 1.6;
  max-width: 620px;
}
.edit-head code {
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 13px;
}
.edit-label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: #9ca3af;
  margin: 18px 0 8px;
}
.edit-linkrow {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.edit-input {
  flex: 1;
  min-width: 220px;
  height: 48px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #374151;
  background: #111827;
  color: #e5e7eb;
  font-family: inherit;
  font-size: 14px;
}
.edit-linkrow .btn-secondary {
  background: transparent;
  color: #93c5fd;
  border-color: #374151;
}
.edit-linkrow .btn-secondary:hover {
  background: rgba(147, 197, 253, 0.1);
}
.edit-textarea {
  width: 100%;
  min-height: 110px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #374151;
  background: #111827;
  color: #e5e7eb;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.55;
  resize: vertical;
}
.edit-textarea:focus,
.edit-input:focus {
  outline: none;
  border-color: var(--bleu);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}
.edit-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.edit-submit {
  width: auto;
  padding: 0 26px;
}
.edit-status {
  font-size: 14px;
  font-weight: 600;
}
.edit-status.ok {
  color: #34d399;
}
.edit-status.err {
  color: #f87171;
}

/* ============================================================
   MARQUEES — accessibilité (mouvement réduit)
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .mq-track,
  .temoin-track {
    animation: none !important;
  }
  .mq,
  .temoin-mq {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .hero-cta-ic .ic {
    animation: none !important;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* Tablette et en dessous : grilles 3→2, écarts resserrés */
@media (max-width: 1024px) {
  .phases,
  .team,
  .fin-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .phases > :last-child:nth-child(odd),
  .fin-cards > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

/* Bascule mobile : tout en une colonne, marges et rythmes adaptés */
@media (max-width: 760px) {
  .phases,
  .chantiers,
  .team,
  .formules,
  .fin-cards {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .tache-card {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 20px;
  }
  .tache-h {
    margin-bottom: 4px;
  }
  .qualiopi {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .qualiopi-logo img {
    max-width: 180px;
  }
  .card,
  .chantier,
  .phase,
  .formule,
  .fin-card,
  .fin-step,
  .ctx-card,
  .soft-card {
    border-radius: 16px;
  }
  .fin-step {
    gap: 14px;
    padding: 18px;
  }
  .fin-step-num {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }
  .hero-tiles {
    gap: 10px;
  }
  .hero-tile {
    padding: 11px 15px;
    font-size: 14px;
  }
  .team-photo {
    max-width: 260px;
    margin-left: auto;
    margin-right: auto;
  }
  .temoin {
    width: min(300px, 84vw);
    padding: 22px 20px;
  }
  .temoin-track {
    animation-duration: 64s;
  }
  .mq-track {
    animation-duration: 30s;
  }
  .btn-print,
  .hero-cta {
    width: auto;
  }

  /* Générateur : passage en pile verticale, aperçu plein écran */
  .app {
    grid-template-columns: 1fr;
    height: auto;
  }
  .app-body {
    height: auto;
    overflow: auto;
  }
  .panel-left {
    padding: 24px 20px;
  }
  .panel-right {
    height: 78vh;
    border-top: 1px solid var(--bordure);
  }
  .actionbar {
    flex-wrap: wrap;
    gap: 12px;
  }
  .actionbar-client {
    flex: 1 0 100%;
  }
  .actionbar-buttons {
    flex-wrap: wrap;
    width: 100%;
  }
  .actionbar-buttons .btn-sm {
    flex: 1;
    justify-content: center;
  }
}

/* Petits téléphones : on resserre encore un cran */
@media (max-width: 420px) {
  .hero-tiles {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-tile {
    text-align: center;
  }
  .formule {
    padding: 24px 20px;
  }
  .accord summary {
    font-size: 15.5px;
    padding: 16px 18px;
  }
  .accord-body {
    padding: 0 18px 18px;
  }
  .modal {
    max-height: 88vh;
  }
  .prix-num {
    font-size: 34px;
  }
}

/* ============================================================
   IMPRESSION / PDF
   ============================================================ */
@media print {
  @page {
    size: A4;
    margin: 15mm;
  }
  body {
    background: #fff;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  [data-noprint],
  .actionbar,
  .link-history,
  .btn-print {
    display: none !important;
  }
  .sec,
  .sec-hero,
  .sec-cta {
    padding: 26px 0 !important;
  }
  .sec-hero,
  .sec-cta,
  .formule-reco,
  .hero-tile {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .card,
  .phase,
  .temoin,
  .tache-card,
  .chantier,
  .formule,
  .fin-card,
  .fin-step,
  .accord,
  .team-card {
    page-break-inside: avoid;
    break-inside: avoid;
    box-shadow: none !important;
  }
  .pay-note {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  #sec-invest,
  #sec-retours {
    page-break-before: always;
    break-before: page;
  }
  .wrap {
    max-width: 100%;
  }
}
