/* ============================================================
   Portail CCI Hautes-Alpes — Assistant IA Tourisme
   Charte officielle (extraite de cci05formation.fr le 2026-05-19)
   ============================================================ */

:root {
  /* Bleu CCI Hautes-Alpes (logo + UI) */
  --cci-blue: #373CF5;
  --cci-blue-dark: #2A2EC7;
  --cci-blue-light: #366AFF;
  --cci-blue-soft: #E3E4FF;
  --cci-blue-bg: #F8FAFF;
  --cci-blue-border: #C8CAFA;

  /* Accents officiels CCI */
  --cci-green: #55BF14;
  --cci-green-dark: #449810;
  --cci-orange: #F26525;
  --cci-orange-dark: #C84F18;
  --cci-gold: #C9A961;          /* accent ocre/montagne pour les hovers et CTA */
  --cci-gold-soft: #F5EFE0;
  --cci-gold-dark: #A88B47;

  /* Textes (palette CCI) */
  --text: #1A1919;
  --text-muted: #777777;
  --text-soft: #8A8B8A;

  /* Fonds & bordures */
  --bg: #fff;
  --bg-soft: #F8FAFF;
  --border: #E5E5E5;
  --border-light: #EFEFEF;

  /* Sémantiques (diag SEO) — dérivés de la palette CCI */
  --green: #55BF14;
  --green-dark: #449810;
  --green-bg: #F1FCE9;
  --green-border: #BFE6A1;
  --orange: #F26525;
  --orange-dark: #C84F18;
  --orange-bg: #FEF1EA;
  --orange-border: #FAC9AD;
  --red: #EF4444;
  --red-dark: #DC2626;
  --red-bg: #FEF2F2;
  --red-border: #FECACA;

  --shadow: 0 2px 10px rgba(55, 60, 245, .06);
  --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: "Fira Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body {
  /* Dégradé doux animé — blanc, ocre très pâle, bleu très pâle */
  background:
    linear-gradient(135deg,
      #FFFFFF 0%,
      #FAFBFE 22%,
      #F8F4EC 48%,
      #FBF7EE 72%,
      #FFFFFF 100%
    );
  background-size: 300% 300%;
  background-attachment: fixed;
  animation: bgGradientShift 35s ease-in-out infinite;
  position: relative;
  overflow-x: hidden;
}

@keyframes bgGradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Pour le décor montagne : pas d'animation pour les utilisateurs sensibles */
@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button { cursor: pointer; border: none; background: none; }

/* ── Décor montagne animé (2 chaînes + neige + sapins + véhicules) ── */
.bg-decor {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 70vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.bg-decor .mountains {
  width: 100%;
  height: 100%;
  display: block;
}

/* Sol horizon — trait subtil */
.bg-decor .ground {
  stroke: var(--cci-blue-dark);
  stroke-opacity: 0.08;
  stroke-width: 1;
  stroke-dasharray: 2 6;
}

/* Chaînes : moins denses, plus grandes, dessin animé.
   Les animations sont en pause par défaut — déclenchées par body.ready
   (ajoutée par welcome-modal.js à la fermeture du premier pop-up). */
.bg-decor .mt-back,
.bg-decor .mt-front,
.bg-decor .snow-back,
.bg-decor .snow-front,
.bg-decor .trees,
.vehicle,
.aircraft {
  animation-play-state: paused;
}
body.ready .bg-decor .mt-back,
body.ready .bg-decor .mt-front,
body.ready .bg-decor .snow-back,
body.ready .bg-decor .snow-front,
body.ready .bg-decor .trees,
body.ready .vehicle,
body.ready .aircraft {
  animation-play-state: running;
}

.bg-decor .mt-back,
.bg-decor .mt-front {
  fill-opacity: 0;
  stroke-dasharray: 6000;
  stroke-dashoffset: 6000;
  vector-effect: non-scaling-stroke;
}

.bg-decor .mt-back {
  stroke: var(--cci-blue);
  stroke-width: 1;
  stroke-opacity: 0.35;
  fill: var(--cci-blue);
  animation:
    drawMountain 6.5s ease-out forwards 0.3s,
    fillBack 2.5s ease-out forwards 5.8s,
    breatheBack 16s ease-in-out infinite 8.5s;
}

.bg-decor .mt-front {
  stroke: var(--cci-blue-dark);
  stroke-width: 1.3;
  stroke-opacity: 0.55;
  fill: var(--cci-blue);
  animation:
    drawMountain 6.5s ease-out forwards 2.8s,
    fillFront 2.5s ease-out forwards 8.3s,
    breatheFront 16s ease-in-out infinite 11s;
}

/* Neige sur les sommets — apparaît en fondu après le dessin */
.bg-decor .snow-back,
.bg-decor .snow-front {
  fill: #ffffff;
  fill-opacity: 0;
  stroke: rgba(255, 255, 255, 0.4);
  stroke-width: 0.6;
  vector-effect: non-scaling-stroke;
}
.bg-decor .snow-back {
  animation: appearSnow 2s ease-out forwards 7.5s;
}
.bg-decor .snow-front {
  animation: appearSnow 2s ease-out forwards 9.5s;
}

/* Sapins — apparaissent en fondu, légère respiration */
.bg-decor .trees {
  fill: #1f3340;
  fill-opacity: 0;
  animation: appearTrees 2.5s ease-out forwards 9s;
}

@keyframes drawMountain {
  to { stroke-dashoffset: 0; }
}
@keyframes fillBack {
  to { fill-opacity: 0.05; }
}
@keyframes fillFront {
  to { fill-opacity: 0.085; }
}
@keyframes breatheBack {
  0%, 100% { fill-opacity: 0.05; }
  50%      { fill-opacity: 0.085; }
}
@keyframes breatheFront {
  0%, 100% { fill-opacity: 0.085; }
  50%      { fill-opacity: 0.13; }
}
@keyframes appearSnow {
  to { fill-opacity: 0.85; }
}
@keyframes appearTrees {
  to { fill-opacity: 0.16; }
}

/* ── Véhicules qui traversent (icônes Lucide outline) ──── */
.vehicle {
  position: absolute;
  bottom: 7%;
  left: 0;
  pointer-events: none;
  opacity: 0;
  will-change: transform;
}
.vehicle svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Voiture — passe ~toutes les 55s, traverse en ~20s */
.car {
  width: 42px;
  height: 42px;
  color: var(--cci-blue-dark);
  transform: translateX(-120px);
  animation: drive 55s linear infinite 15s;
}
@keyframes drive {
  0%, 100% { transform: translateX(-120px); opacity: 0; }
  2%       { opacity: 0.75; }
  35%      { transform: translateX(calc(100vw + 120px)); opacity: 0.75; }
  37%      { transform: translateX(calc(100vw + 120px)); opacity: 0; }
}

/* Vélo — passe plus rarement (~75s), traverse plus lentement (~25s), décalé */
.bike {
  width: 40px;
  height: 40px;
  color: var(--cci-blue-dark);
  transform: translateX(-100px);
  animation: ride 75s linear infinite 38s;
}
@keyframes ride {
  0%, 100% { transform: translateX(-100px); opacity: 0; }
  2%       { opacity: 0.65; }
  33%      { transform: translateX(calc(100vw + 100px)); opacity: 0.65; }
  35%      { transform: translateX(calc(100vw + 100px)); opacity: 0; }
}

/* ── Avions qui traversent en altitude ─────────────────── */
.aircraft {
  position: fixed;
  left: 0;
  pointer-events: none;
  opacity: 0;
  will-change: transform;
  color: var(--cci-blue);
  z-index: 0;
}
.aircraft svg { width: 100%; height: 100%; display: block; }

/* Montgolfière 1 — altitude haute (~10% du haut), dérive lentement vers la droite */
.balloon-1 {
  top: 10vh;
  width: 44px;
  height: 64px;
  transform: translateX(-180px);
  animation: drift-1 140s linear infinite 18s;
}
@keyframes drift-1 {
  0%, 100% { transform: translateX(-180px) translateY(0); opacity: 0; }
  3%       { opacity: 0.55; }
  20%      { transform: translateX(calc(20vw)) translateY(-6px); opacity: 0.55; }
  50%      { transform: translateX(calc(60vw)) translateY(4px); opacity: 0.55; }
  68%      { transform: translateX(calc(100vw + 180px)) translateY(-3px); opacity: 0.55; }
  71%      { transform: translateX(calc(100vw + 180px)) translateY(0); opacity: 0; }
}

/* Montgolfière 2 — altitude un peu plus basse (~24% du haut), dérive vers la gauche */
.balloon-2 {
  top: 24vh;
  right: 0;
  left: auto;
  width: 36px;
  height: 54px;
  transform: translateX(180px);
  animation: drift-2 160s linear infinite 80s;
}
@keyframes drift-2 {
  0%, 100% { transform: translateX(180px) translateY(0); opacity: 0; }
  3%       { opacity: 0.5; }
  22%      { transform: translateX(calc(-20vw)) translateY(5px); opacity: 0.5; }
  52%      { transform: translateX(calc(-60vw)) translateY(-4px); opacity: 0.5; }
  70%      { transform: translateX(calc(-100vw - 180px)) translateY(3px); opacity: 0.5; }
  73%      { transform: translateX(calc(-100vw - 180px)) translateY(0); opacity: 0; }
}

/* Coupure pour utilisateurs sensibles : tout en statique */
@media (prefers-reduced-motion: reduce) {
  .bg-decor .mt-back,
  .bg-decor .mt-front {
    stroke-dashoffset: 0;
    animation: none;
  }
  .bg-decor .mt-back  { fill-opacity: 0.06; }
  .bg-decor .mt-front { fill-opacity: 0.11; }
  .bg-decor .snow-back,
  .bg-decor .snow-front { fill-opacity: 0.85; animation: none; }
  .bg-decor .trees { fill-opacity: 0.16; animation: none; }
  .vehicle { display: none; }
}

/* En mobile, on atténue le décor pour ne pas distraire de la lecture */
@media (max-width: 700px) {
  .bg-decor { opacity: 0.55; }
  /* Aéronefs cachés sur mobile (les véhicules au sol restent) */
  .aircraft { display: none; }
}

/* ── Header ─────────────────────────────────────────────── */
.hdr {
  background:
    /* Silhouette de montagne en filigrane (SVG inline en data URI) */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200' preserveAspectRatio='none'%3E%3Cpath d='M0,200 L0,150 L120,90 L200,130 L320,60 L420,100 L520,40 L640,90 L740,30 L850,80 L960,50 L1080,100 L1200,70 L1200,200 Z' fill='rgba(255,255,255,0.06)'/%3E%3Cpath d='M0,200 L0,170 L100,130 L180,150 L280,100 L380,140 L480,90 L580,130 L680,80 L780,120 L880,90 L980,130 L1080,110 L1200,140 L1200,200 Z' fill='rgba(255,255,255,0.04)'/%3E%3C/svg%3E") bottom/100% auto no-repeat,
    linear-gradient(135deg, #373CF5 0%, #2A2EC7 100%);
  padding-top: 20px;
  padding-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  overflow: hidden;
}
.hdr::after {
  /* Glow ocre subtil en haut à droite — clin d'œil à l'accent montagne */
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(201, 169, 97, .25) 0%, transparent 70%);
  pointer-events: none;
}
.hdr-left { display: flex; align-items: center; gap: 14px; }
.logo-sq {
  width: 40px; height: 40px;
  background: rgba(255, 255, 255, .18);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.logo-sq svg { width: 22px; height: 22px; }

/* Logo CCI officiel (SVG inline, teinté via currentColor) */
.logo-cci {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.logo-cci svg {
  height: 38px;
  width: auto;
  display: block;
}
@media (max-width: 600px) {
  .logo-cci svg { height: 32px; }
  .brand-name { font-size: 13px; }
  .brand-sub { font-size: 10px; }
  .hdr { padding-top: 14px; padding-bottom: 14px; }
  .hdr-left { gap: 10px; }
}

/* Co-branding "La Tournée des Before" — logo séparé par un trait vertical */
.hdr-cobrand {
  display: flex;
  align-items: center;
  padding-left: 14px;
  margin-left: 4px;
  border-left: 1px solid rgba(255, 255, 255, .25);
}
.before-logo {
  height: 30px;
  width: auto;
  display: block;
}
@media (max-width: 600px) {
  .hdr-cobrand { padding-left: 10px; }
  .before-logo { height: 24px; }
}
@media (max-width: 420px) {
  /* Sur très petit écran on cache le co-branding pour garder le header lisible */
  .hdr-cobrand { display: none; }
}
.brand-name { font-size: 15px; font-weight: 600; color: #fff; line-height: 1.2; }
.brand-sub { font-size: 11px; color: rgba(255, 255, 255, .65); }
.hdr-badge {
  background: rgba(255, 255, 255, .15);
  border-radius: 12px;
  padding: 4px 12px;
  font-size: 11px;
  color: #fff;
}

/* Conteneur des actions à droite du header */
.hdr-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* Bouton "Comment ça marche" — sobre, intégré au header bleu */
.help-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s cubic-bezier(.4,0,.2,1);
}
.help-btn svg { width: 16px; height: 16px; }
.help-btn:hover {
  background: rgba(255, 255, 255, .25);
  border-color: rgba(255, 255, 255, .5);
  transform: translateY(-1px);
}
.help-btn:active { transform: translateY(0); }
.help-btn.icon-only { padding: 7px 9px; }
.help-btn.icon-only svg { width: 18px; height: 18px; }
@media (max-width: 700px) {
  .help-btn span { display: none; }
  .help-btn { padding: 8px; }
  .help-btn svg { width: 18px; height: 18px; }
  /* Le badge "Gratuit · Sans inscription" est trop encombrant en mobile */
  .hdr-badge { display: none; }
}

/* ── Tabs ───────────────────────────────────────────────── */
.tabs {
  background: var(--cci-blue-dark);
  display: flex;
  gap: 4px;
  overflow-x: auto;
  position: relative;
}
.tab {
  padding: 14px 20px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, .55);
  font-weight: 500;
  white-space: nowrap;
  position: relative;
  transition: color .2s ease;
  letter-spacing: .01em;
}
.tab:hover { color: rgba(255, 255, 255, .9); }
.tab.on { color: #fff; font-weight: 600; }
.tab::after {
  /* Indicator animé sous l'onglet actif — slide en douceur */
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #fff 0%, var(--cci-gold) 100%);
  border-radius: 3px 3px 0 0;
  transform: translateX(-50%);
  transition: width .35s cubic-bezier(.4, 0, .2, 1);
}
.tab.on::after { width: calc(100% - 24px); }
@media (max-width: 600px) {
  .tab { padding: 12px 14px; font-size: 12.5px; }
}

/* ── Layout ─────────────────────────────────────────────── */
/* Le portail prend toute la largeur de l'écran.
   Le contenu interne reste contenu à une largeur lisible (~1200px)
   via un padding adaptatif qui centre la zone utile sur les grands écrans. */
:root {
  --content-max: 1200px;
}

.app {
  width: 100%;
  max-width: none;
  margin: 0;
  background: transparent;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  /* Footer poussé en bas du viewport sur les pages courtes, sans étirer le body
     (le body garde sa taille naturelle, on voit le décor dans l'espace libre). */
  display: flex;
  flex-direction: column;
}
.app > .ft { margin-top: auto; }

/* Padding adaptatif : centre le contenu sur grand écran, padding standard sur petit */
.hdr,
.tabs,
.body,
.ft {
  padding-left: max(24px, calc((100% - var(--content-max)) / 2 + 24px));
  padding-right: max(24px, calc((100% - var(--content-max)) / 2 + 24px));
}

.body {
  padding-top: 28px;
  padding-bottom: 32px;
}

@media (max-width: 700px) {
  .hdr, .tabs, .body, .ft {
    padding-left: 18px;
    padding-right: 18px;
  }
  .body { padding-top: 20px; padding-bottom: 24px; }
}

/* Fade-in sur chaque panel d'onglet quand il devient visible */
.tab-panel:not(.hidden) {
  animation: panelFadeIn .35s ease-out;
}
@keyframes panelFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.section-label {
  font-size: 11px;
  color: var(--cci-blue);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::before {
  content: "";
  width: 18px;
  height: 2px;
  background: linear-gradient(90deg, var(--cci-blue) 0%, var(--cci-gold) 100%);
  border-radius: 2px;
}

/* ── Bandeau pédagogique 1-2-3 ──────────────────────────── */
.howto {
  background: linear-gradient(135deg, var(--cci-blue-bg) 0%, #fefcf6 100%);
  border: 1px solid var(--cci-blue-border);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  position: relative;
  box-shadow: 0 2px 12px rgba(55, 60, 245, .04);
}
.howto-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  position: relative;
  /* Apparition en cascade au chargement */
  animation: howtoFadeIn 0.6s ease-out both;
}
.howto-step:nth-child(1) { animation-delay: 0.1s; }
.howto-step:nth-child(2) { animation-delay: 0.3s; }
.howto-step:nth-child(3) { animation-delay: 0.5s; }

.howto-num {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cci-blue) 0%, var(--cci-blue-dark) 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 15px;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 10px rgba(55, 60, 245, .25);
  /* Pulse séquentiel en boucle — onde qui suit 1 → 2 → 3 */
  animation: howtoPulse 6s ease-in-out infinite;
  animation-delay: calc(0.8s + var(--pulse-offset, 0s));
}
.howto-step:nth-child(1) .howto-num { --pulse-offset: 0s; }
.howto-step:nth-child(2) .howto-num { --pulse-offset: 1.2s; }
.howto-step:nth-child(3) .howto-num { --pulse-offset: 2.4s; }

.howto-text { font-size: 12.5px; line-height: 1.5; color: #555; }
.howto-text strong { display: block; color: var(--text); font-size: 13px; font-weight: 600; margin-bottom: 4px; }

/* Petite flèche entre les étapes (sauf après la dernière) — desktop uniquement */
.howto-step:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -14px;
  top: 6px;
  color: var(--cci-gold);
  opacity: 0;
  font-size: 18px;
  font-weight: 600;
  animation: arrowAppear 0.5s ease-out forwards;
}
.howto-step:nth-child(1)::after { animation-delay: 0.5s; }
.howto-step:nth-child(2)::after { animation-delay: 0.7s; }

@keyframes howtoFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes howtoPulse {
  0%, 18%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(55, 60, 245, .45);
  }
  6% {
    transform: scale(1.18);
    box-shadow: 0 0 0 10px rgba(55, 60, 245, 0);
  }
  12% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(55, 60, 245, 0);
  }
}

@keyframes arrowAppear {
  to { opacity: 0.45; }
}

/* Accessibilité : on coupe les animations pour les utilisateurs sensibles */
@media (prefers-reduced-motion: reduce) {
  .howto-step,
  .howto-num,
  .howto-step::after {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .howto-step:not(:last-child)::after { opacity: 0.45; }
}

@media (max-width: 600px) {
  .howto { grid-template-columns: 1fr; }
  /* Sur mobile, on cache les flèches latérales (les étapes sont empilées verticalement) */
  .howto-step:not(:last-child)::after { display: none; }
}

/* ── Use case grid (Module 1 sélection) — style Bento ──── */
.uc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
@media (max-width: 900px) { .uc-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .uc-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
@media (max-width: 700px) {
  /* Cards plus compactes en mobile pour rester en 2 colonnes confortablement */
  .uc { padding: 14px 12px; }
  .uc-ico { width: 38px; height: 38px; margin-bottom: 10px; }
  .uc-ico svg { width: 19px; height: 19px; }
  .uc-t { font-size: 12.5px; }
  .uc-d { font-size: 10.5px; }
}
@media (max-width: 340px) { .uc-grid { grid-template-columns: 1fr; } }

.uc {
  padding: 18px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  display: block;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
  transition: border-color .2s, transform .2s cubic-bezier(.4,0,.2,1), box-shadow .25s;
  animation: ucFadeIn .5s ease-out backwards;
}
.uc:nth-child(1) { animation-delay: .05s; }
.uc:nth-child(2) { animation-delay: .1s; }
.uc:nth-child(3) { animation-delay: .15s; }
.uc:nth-child(4) { animation-delay: .2s; }
.uc:nth-child(5) { animation-delay: .25s; }
.uc:nth-child(6) { animation-delay: .3s; }
.uc:nth-child(7) { animation-delay: .35s; }
.uc:nth-child(8) { animation-delay: .4s; }
@keyframes ucFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .uc { animation: none; }
}
.uc::before {
  /* Halo doré qui apparaît en hover — clin d'œil ocre */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(201, 169, 97, .12) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.uc:hover {
  border-color: var(--cci-gold);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(55, 60, 245, .12), 0 2px 6px rgba(201, 169, 97, .15);
}
.uc:hover::before { opacity: 1; }
.uc:active { transform: translateY(-1px); }
.uc.sel {
  border-color: var(--cci-blue);
  background: var(--cci-blue-bg);
  border-width: 1.5px;
}

.uc-ico {
  width: 44px; height: 44px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--cci-blue-soft) 0%, #d8d9ff 100%);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
  transition: transform .25s cubic-bezier(.4,0,.2,1), background .25s;
}
.uc:hover .uc-ico {
  transform: scale(1.08) rotate(-3deg);
  background: linear-gradient(135deg, var(--cci-blue-soft) 0%, var(--cci-gold-soft) 100%);
}
.uc-ico svg {
  width: 22px; height: 22px;
  stroke: var(--cci-blue);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .2s;
}
.uc:hover .uc-ico svg { stroke: var(--cci-blue-dark); }
.uc-t {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
  position: relative;
  z-index: 1;
}
.uc-d {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  position: relative;
  z-index: 1;
}

.info-note {
  background: linear-gradient(135deg, var(--cci-blue-bg) 0%, #fefcf6 100%);
  border-left: 3px solid var(--cci-gold);
  border-radius: 0 10px 10px 0;
  padding: 12px 16px;
  font-size: 12.5px;
  color: #444;
  line-height: 1.5;
}
.info-note strong { color: var(--cci-blue-dark); }

/* ── Steps bar (parcours guidé) ─────────────────────────── */
.steps-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  padding: 14px 16px;
  background: var(--bg-soft);
  border-radius: 12px;
  border: 1px solid var(--border-light);
}
.step-n {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  transition: all .25s;
}
.step-done {
  background: linear-gradient(135deg, var(--cci-blue) 0%, var(--cci-blue-dark) 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(55, 60, 245, .25);
}
.step-act {
  background: #fff;
  color: var(--cci-blue);
  outline: 2px solid var(--cci-blue);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(55, 60, 245, .12);
}
.step-todo { background: #f0f0f5; color: #b0b0c0; }
.step-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--cci-blue) 0%, var(--border) 100%);
  min-width: 16px;
  border-radius: 1px;
}
.step-lbl { font-size: 11.5px; color: var(--text-muted); margin: 0 6px; font-weight: 500; }
.step-lbl.act { color: var(--cci-blue); font-weight: 600; }
@media (max-width: 600px) {
  .steps-bar { padding: 12px; gap: 3px; }
  .step-n { width: 26px; height: 26px; font-size: 12px; }
  .step-lbl { font-size: 10.5px; margin: 0 3px; }
  /* Sur très petit, on cache les labels qui ne sont pas actifs (juste les numéros visibles) */
  .step-lbl:not(.act) { display: none; }
}

.change-link {
  margin-left: auto;
  font-size: 12px;
  color: var(--cci-blue);
  text-decoration: none;
  cursor: pointer;
}
.change-link:hover { text-decoration: underline; }

/* ── Form ───────────────────────────────────────────────── */
.fblock {
  background: var(--bg-soft);
  border: 1px solid var(--border-light);
  border-radius: 11px;
  padding: 12px 14px;
  margin-bottom: 10px;
  transition: border-color .2s, box-shadow .2s;
}
.fblock:focus-within {
  border-color: var(--cci-blue);
  box-shadow: 0 0 0 3px rgba(55, 60, 245, .08);
}
.fblock label {
  font-size: 11.5px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}
.fblock label .req { color: var(--red); font-weight: 700; }

.fblock input,
.fblock textarea,
.fblock select {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13.5px;
  color: var(--text);
  outline: none;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.fblock input:focus,
.fblock textarea:focus,
.fblock select:focus {
  border-color: var(--cci-blue);
  box-shadow: 0 0 0 3px rgba(55, 60, 245, .1);
}
.fblock textarea { resize: vertical; min-height: 80px; line-height: 1.5; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 600px) { .field-grid { grid-template-columns: 1fr; } }

/* Grille de cases à cocher (Module 3 — axes d'audit) */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 6px;
}
@media (max-width: 600px) { .checkbox-grid { grid-template-columns: 1fr; } }

.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  transition: all .15s;
  user-select: none;
}
.check-item:hover {
  border-color: var(--cci-gold);
  background: var(--cci-gold-soft);
}
.check-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--cci-blue);
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}
.check-item:has(input:checked) {
  border-color: var(--cci-blue);
  background: var(--cci-blue-bg);
  font-weight: 500;
}

.btn-row {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  gap: 10px;
}
.btn-back, .btn-next, .btn-primary {
  padding: 10px 22px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .01em;
  transition: all .2s cubic-bezier(.4,0,.2,1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-back {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-muted);
}
.btn-back:hover {
  border-color: var(--text-muted);
  color: var(--text);
}
.btn-next, .btn-primary {
  background: linear-gradient(135deg, var(--cci-blue) 0%, var(--cci-blue-dark) 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(55, 60, 245, .25);
  border: none;
}
.btn-next:hover, .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(55, 60, 245, .35), 0 0 0 1px rgba(201, 169, 97, .3);
}
.btn-next:active, .btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(55, 60, 245, .2);
}
.btn-next:disabled { opacity: .4; cursor: not-allowed; transform: none !important; }

/* ── Prompt généré (résultat Module 1) ──────────────────── */
.res-box {
  background: linear-gradient(135deg, var(--cci-blue-bg) 0%, #fefcf6 100%);
  border: 1.5px solid var(--cci-blue-border);
  border-radius: 12px;
  padding: 18px;
  font-size: 13.5px;
  line-height: 1.7;
  color: #1f1f3a;
  margin-bottom: 14px;
  white-space: pre-wrap;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  max-height: 420px;
  overflow-y: auto;
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}
.copy-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}
.copy-hint { font-size: 12.5px; color: var(--text-muted); }

.btn-copy {
  padding: 9px 18px;
  border: 1.5px solid var(--cci-blue);
  border-radius: 8px;
  font-size: 13px;
  color: var(--cci-blue);
  background: #fff;
  font-weight: 600;
  transition: all .2s cubic-bezier(.4,0,.2,1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-copy:hover {
  background: var(--cci-blue);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(55, 60, 245, .25);
}
.btn-copy.done {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  animation: copyPulse .5s ease-out;
}
@keyframes copyPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.ai-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 8px;
}
@media (max-width: 700px) { .ai-row { grid-template-columns: 1fr; } }

.ai-c {
  padding: 14px 14px 12px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: #fff;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, transform .1s, box-shadow .15s;
  cursor: pointer;
}
.ai-c:hover {
  border-color: var(--cci-blue);
  box-shadow: 0 4px 14px rgba(55, 60, 245, .08);
}
.ai-c:active { transform: scale(.99); }

.ai-c-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ai-c-logo {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ai-c-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.ai-pill {
  display: inline-block;
  font-size: 9px;
  padding: 3px 8px;
  border-radius: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.pg { background: #e8f5e9; color: #2e7d32; }
.po { background: #fff3e0; color: #bf360c; }
.pb { background: #ede7f6; color: #4527a0; }

.ai-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.ai-flag {
  font-size: 14px;
  line-height: 1;
  filter: grayscale(0);
}
.ai-country {
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 4px;
}
.ai-usecase {
  font-size: 12px;
  color: #555;
  line-height: 1.5;
  flex: 1;
}
.ai-open {
  font-size: 11px;
  font-weight: 600;
  color: var(--cci-blue);
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ai-open span { font-size: 13px; }

/* ── Module 2 — bibliothèque (style Bento) ──────────────── */
.qp-cats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.qpc {
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text-muted);
  background: #fff;
  font-weight: 500;
  transition: all .2s cubic-bezier(.4,0,.2,1);
  cursor: pointer;
}
.qpc:hover {
  border-color: var(--cci-gold);
  color: var(--text);
  background: var(--cci-gold-soft);
}
.qpc.on {
  background: linear-gradient(135deg, var(--cci-blue) 0%, var(--cci-blue-dark) 100%);
  border-color: var(--cci-blue);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(55, 60, 245, .25);
}

.qp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 700px) { .qp-grid { grid-template-columns: 1fr; gap: 12px; } }
@media (max-width: 600px) {
  .qp-card { padding: 16px 14px 14px; }
  .qp-t { font-size: 13.5px; }
  .qp-p { font-size: 11.5px; }
}

.qp-card {
  padding: 18px 18px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  display: block;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
  transition: all .25s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.qp-card::before {
  /* Halo doré en hover, comme les use cases */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(201, 169, 97, .1) 0%, transparent 55%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.qp-card:hover {
  border-color: var(--cci-gold);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(55, 60, 245, .1), 0 2px 6px rgba(201, 169, 97, .12);
}
.qp-card:hover::before { opacity: 1; }

.qp-tag {
  display: inline-block;
  font-size: 10px;
  color: var(--cci-blue);
  background: var(--cci-blue-bg);
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
  position: relative;
  z-index: 1;
}
.qp-t {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
  position: relative;
  z-index: 1;
}
.qp-p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  position: relative;
  z-index: 1;
}
.qp-cta {
  font-size: 12px;
  color: var(--cci-blue);
  margin-top: 10px;
  font-weight: 600;
  position: relative;
  z-index: 1;
  transition: color .2s;
}
.qp-card:hover .qp-cta { color: var(--cci-gold-dark); }

/* Open prompt card */
.qp-open {
  background: linear-gradient(135deg, var(--cci-blue-bg) 0%, #fefcf6 100%);
  border: 1.5px solid var(--cci-blue-border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 4px 16px rgba(55, 60, 245, .08);
}
.qp-open-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}
.qp-open-t {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.qp-text {
  font-size: 13.5px;
  color: #1f1f3a;
  line-height: 1.7;
  white-space: pre-wrap;
  background: #fff;
  border-radius: 10px;
  padding: 14px 16px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  margin-bottom: 12px;
  border: 1px solid rgba(55, 60, 245, .08);
}
.qp-tip {
  font-size: 12px;
  color: var(--cci-gold-dark);
  background: var(--cci-gold-soft);
  border-left: 3px solid var(--cci-gold);
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 14px;
  line-height: 1.5;
  font-weight: 500;
}

/* ── Module 3 — Diag SEO ────────────────────────────────── */
.diag-intro {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200' preserveAspectRatio='none'%3E%3Cpath d='M0,200 L0,150 L120,90 L200,130 L320,60 L420,100 L520,40 L640,90 L740,30 L850,80 L960,50 L1080,100 L1200,70 L1200,200 Z' fill='rgba(255,255,255,0.06)'/%3E%3C/svg%3E") bottom/100% auto no-repeat,
    linear-gradient(135deg, var(--cci-blue) 0%, var(--cci-blue-dark) 100%);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(55, 60, 245, .15);
}
.diag-intro::after {
  content: "";
  position: absolute;
  top: -30px;
  right: -30px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(201, 169, 97, .3) 0%, transparent 70%);
  pointer-events: none;
}
.diag-intro h3 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}
.diag-intro p {
  font-size: 13px;
  color: rgba(255, 255, 255, .85);
  line-height: 1.55;
  position: relative;
  z-index: 1;
}

.diag-form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
}
.diag-form .section-label { margin-bottom: 10px; }
.diag-form input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 12px;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.diag-form input:focus {
  border-color: var(--cci-blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(55, 60, 245, .1);
}

.legend {
  display: flex;
  gap: 18px;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: var(--bg-soft);
  border-radius: 9px;
  flex-wrap: wrap;
}
.leg { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #555; font-weight: 500; }
.leg-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .04);
}

.ch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  transition: border-color .2s, transform .15s, box-shadow .25s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .03);
}
.ch-row:hover {
  border-color: var(--cci-gold);
  transform: translateX(2px);
  box-shadow: 0 4px 12px rgba(55, 60, 245, .06);
}
.ch-ico {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  padding: 8px;
}
.ch-ico svg { width: 100%; height: 100%; display: block; }
.ch-ico img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ch-name { font-size: 14px; font-weight: 600; color: var(--text); }
.ch-desc { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }

.score-dots { display: flex; gap: 6px; }
.sdot {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: #fff;
  cursor: pointer;
  transition: all .15s cubic-bezier(.4,0,.2,1);
}
.sdot:hover { transform: scale(1.15); }
.sdot.s-g {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(85, 191, 20, .15);
}
.sdot.s-o {
  background: var(--orange);
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(242, 101, 37, .15);
}
.sdot.s-r {
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .15);
}
.ch-st {
  font-size: 11.5px;
  font-weight: 600;
  min-width: 80px;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.st-g { color: var(--green-dark); }
.st-o { color: var(--orange-dark); }
.st-r { color: var(--red-dark); }
.st-n { color: #b0b0c0; }

.score-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.sc-card {
  padding: 16px;
  border-radius: 12px;
  text-align: center;
  transition: transform .2s;
  position: relative;
  overflow: hidden;
}
.sc-card:hover { transform: translateY(-2px); }
.scg {
  background: linear-gradient(135deg, var(--green-bg) 0%, #ddf7c8 100%);
  border: 1.5px solid var(--green-border);
}
.sco {
  background: linear-gradient(135deg, var(--orange-bg) 0%, #fee0c8 100%);
  border: 1.5px solid var(--orange-border);
}
.scr {
  background: linear-gradient(135deg, var(--red-bg) 0%, #fde0e0 100%);
  border: 1.5px solid var(--red-border);
}
.sc-n {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
}
.scng { color: var(--green-dark); }
.scno { color: var(--orange-dark); }
.scnr { color: var(--red-dark); }
.sc-l {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
}

.reco-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 11px;
  margin-bottom: 8px;
  border: 1px solid;
  transition: transform .15s, box-shadow .2s;
}
.reco-row:hover {
  transform: translateX(3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .05);
}
.r-red {
  background: linear-gradient(135deg, var(--red-bg) 0%, #fff5f5 100%);
  border-color: var(--red-border);
}
.r-orange {
  background: linear-gradient(135deg, var(--orange-bg) 0%, #fffaf0 100%);
  border-color: var(--orange-border);
}
.r-ico { font-size: 16px; margin-top: 1px; flex-shrink: 0; }
.r-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.r-text { font-size: 12px; color: #555; line-height: 1.55; }

.disclaimer {
  background: linear-gradient(135deg, #fffbeb 0%, var(--cci-gold-soft) 100%);
  border: 1px solid #fde68a;
  border-left: 4px solid var(--cci-gold);
  border-radius: 11px;
  padding: 14px 18px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(201, 169, 97, .08);
}
.disc-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--cci-gold-dark);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.disc-text { font-size: 12.5px; color: #5a4514; line-height: 1.6; }
.disc-text a { color: var(--cci-gold-dark); font-weight: 600; }
.disc-text p { margin-bottom: 6px; }
.disc-text p:last-child { margin-bottom: 0; }

/* Encart Digit'Alpes — fond clair pour mettre en valeur le logo officiel */
.digit-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: #fff;
  border: 1.5px solid #1B3A52;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: background .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 2px 8px rgba(27, 58, 82, .08);
}
.digit-btn:hover {
  background: #FAF8F2;
  box-shadow: 0 4px 14px rgba(27, 58, 82, .12);
}
.digit-btn:active { transform: scale(.99); }

.dg-logo {
  width: 90px; height: 60px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dg-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.dg-content { flex: 1; min-width: 0; }
.dg-title {
  font-size: 14px;
  font-weight: 600;
  color: #1B3A52;
  line-height: 1.3;
}
.dg-sub {
  font-size: 12px;
  color: #5a6b7a;
  line-height: 1.5;
  margin-top: 4px;
}
.dg-arr {
  color: #C9A961;
  font-size: 20px;
  font-weight: 600;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .digit-btn { padding: 12px 14px; gap: 12px; flex-wrap: wrap; }
  .dg-logo { width: 64px; height: 44px; }
  .dg-title { font-size: 13px; }
  .dg-sub { font-size: 11.5px; }
  .dg-arr { font-size: 18px; }
}

/* ── Loader / spinner ───────────────────────────────────── */
.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 30px;
  color: var(--text-muted);
  font-size: 13px;
  background: var(--bg-soft);
  border-radius: 12px;
  margin: 16px 0;
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--cci-blue-soft);
  border-top-color: var(--cci-blue);
  border-right-color: var(--cci-gold);
  border-radius: 50%;
  animation: spin .9s linear infinite;
  margin-bottom: 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Pop-up d'introduction (welcome modal) ──────────────── */
.welcome-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10000;          /* très haut pour couvrir tout, y compris décor */
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  /* Compat iOS Safari : éviter que le body scrollable masque le modal */
  -webkit-overflow-scrolling: touch;
  overflow-y: auto;
}
.welcome-modal.open {
  display: flex;
  animation: wmFadeIn .3s ease-out;
}

.wm-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(20, 25, 45, .55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  cursor: pointer;
  animation: wmBackdropIn .3s ease-out;
  z-index: -1;             /* derrière la card, mais dans le modal */
}

.wm-card {
  position: relative;
  z-index: 1;
  max-width: 520px;
  width: 100%;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);   /* dvh = dynamic viewport height (iOS 16+) — gère les barres d'adresse */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 120' preserveAspectRatio='none'%3E%3Cpath d='M0,120 L0,90 L100,40 L180,70 L260,30 L340,60 L420,20 L500,50 L580,30 L600,40 L600,120 Z' fill='rgba(55,60,245,0.04)'/%3E%3Cpath d='M0,120 L0,100 L80,70 L160,85 L240,60 L320,80 L400,50 L480,75 L560,55 L600,70 L600,120 Z' fill='rgba(201,169,97,0.06)'/%3E%3C/svg%3E") bottom/100% auto no-repeat,
    linear-gradient(135deg, #ffffff 0%, #fbfaf6 100%);
  border-radius: 20px;
  padding: 32px 30px 28px;
  box-shadow:
    0 20px 60px rgba(20, 25, 45, .25),
    0 0 0 1px rgba(55, 60, 245, .08);
  animation: wmCardIn .4s cubic-bezier(.4, 0, .2, 1);
}
@media (max-width: 600px) {
  .welcome-modal { padding: 16px; }
  .wm-card { padding: 24px 20px 22px; border-radius: 16px; }
  .wm-title { font-size: 19px; }
  .wm-subtitle { font-size: 13px; margin-bottom: 18px; }
  .wm-step { gap: 12px; }
  .wm-step-label { font-size: 13.5px; }
  .wm-step-desc { font-size: 12px; }
  .wm-cta { padding: 12px 18px; font-size: 14px; }
}

.wm-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  border: none;
  transition: all .15s;
}
.wm-close:hover {
  background: var(--bg-soft);
  color: var(--text);
}
.wm-close svg { width: 18px; height: 18px; }

.wm-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--cci-blue-soft) 0%, var(--cci-gold-soft) 100%);
  color: var(--cci-blue);
  margin-bottom: 14px;
  animation: wmBounce .6s cubic-bezier(.34, 1.56, .64, 1) .15s both;
  box-shadow: 0 4px 14px rgba(55, 60, 245, .15);
}
.wm-emoji svg {
  width: 28px;
  height: 28px;
}

.wm-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.25;
}

.wm-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 24px;
}

.wm-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}
.wm-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  opacity: 0;
  transform: translateY(8px);
  animation: wmStepIn .45s ease-out var(--step-delay, 0s) forwards;
}
.wm-step-n {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cci-blue) 0%, var(--cci-blue-dark) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(55, 60, 245, .25);
}
.wm-step-body { flex: 1; min-width: 0; }
.wm-step-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}
.wm-step-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

.wm-cta {
  width: 100%;
  padding: 13px 22px;
  background: linear-gradient(135deg, var(--cci-blue) 0%, var(--cci-blue-dark) 100%);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  border: none;
  border-radius: 11px;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: .01em;
  box-shadow: 0 4px 14px rgba(55, 60, 245, .3);
  transition: all .2s cubic-bezier(.4, 0, .2, 1);
}
.wm-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(55, 60, 245, .4), 0 0 0 1px rgba(201, 169, 97, .3);
}
.wm-cta:active { transform: translateY(0); }

/* Empêche le scroll body quand le modal est ouvert */
body.modal-open { overflow: hidden; }

@keyframes wmFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes wmBackdropIn {
  from { backdrop-filter: blur(0); -webkit-backdrop-filter: blur(0); background: rgba(20, 25, 45, 0); }
  to   { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); background: rgba(20, 25, 45, .55); }
}
@keyframes wmCardIn {
  from { opacity: 0; transform: translateY(20px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes wmStepIn {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes wmBounce {
  0%   { transform: scale(0); }
  60%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Décor flouté quand modal ouvert (en plus du backdrop, ajoute du flou sur l'app entière) */
body.modal-open .app,
body.modal-open .bg-decor {
  filter: blur(2px);
  pointer-events: none;
  transition: filter .3s;
}

/* ── Modal QR code ──────────────────────────────────────── */
.qr-card { max-width: 420px; text-align: center; }
.qr-card .wm-title { margin-top: 8px; }

.qr-svg {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
  border: 2px solid var(--cci-blue-bg);
  border-radius: 14px;
  padding: 16px;
  margin: 18px auto 14px;
  max-width: 280px;
  box-shadow: 0 4px 16px rgba(55, 60, 245, .08);
}
.qr-svg svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 240px;
}

.qr-url {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11.5px;
  color: var(--text-muted);
  word-break: break-all;
  padding: 8px 12px;
  background: var(--bg-soft);
  border-radius: 7px;
  margin-bottom: 14px;
}

.qr-tip {
  font-size: 11.5px;
  color: var(--cci-gold-dark);
  background: var(--cci-gold-soft);
  border-left: 3px solid var(--cci-gold);
  padding: 10px 12px;
  border-radius: 0 8px 8px 0;
  text-align: left;
  line-height: 1.5;
  margin-bottom: 14px;
}
.qr-tip strong { color: #6F5210; }
.qr-tip code {
  background: #fff;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
}

/* ── Toast ──────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: linear-gradient(135deg, #1a1a2e 0%, #2a2a4a 100%);
  color: #fff;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s cubic-bezier(.4,0,.2,1), transform .25s cubic-bezier(.4,0,.2,1);
  z-index: 1000;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .25), 0 0 0 1px rgba(201, 169, 97, .15);
  border-left: 3px solid var(--cci-gold);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Erreur ─────────────────────────────────────────────── */
.error {
  background: linear-gradient(135deg, var(--red-bg) 0%, #fff5f5 100%);
  border: 1px solid var(--red-border);
  border-left: 4px solid var(--red);
  border-radius: 11px;
  padding: 12px 16px;
  color: var(--red-dark);
  font-size: 12.5px;
  margin-bottom: 12px;
  line-height: 1.5;
}

/* ── Footer ─────────────────────────────────────────────── */
.ft {
  background: linear-gradient(135deg, var(--bg-soft) 0%, var(--cci-blue-bg) 100%);
  border-top: 1px solid var(--cci-blue-border);
  padding-top: 26px;
  padding-bottom: 26px;
  margin-top: 50px;
  position: relative;
}
.ft::before {
  /* Trait dégradé bleu→ocre en haut du footer pour le clin d'œil montagne */
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cci-blue) 0%, var(--cci-gold) 100%);
}
.ft-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.ft-col { display: flex; flex-direction: column; gap: 4px; }
.ft-brand { font-size: 13px; font-weight: 600; color: var(--text); }
.ft-sub { font-size: 11px; color: var(--text-muted); line-height: 1.5; max-width: 380px; }
.ft-sub a { color: var(--cci-blue); }
.ft-links { gap: 6px; align-items: flex-end; }
.ft-links a {
  font-size: 12px;
  color: var(--cci-blue);
  text-decoration: none;
}
.ft-links a:hover { text-decoration: underline; }
.ft-rgpd {
  font-size: 11px;
  color: var(--green-dark);
  margin-top: 2px;
}
@media (max-width: 600px) {
  .ft-inner { flex-direction: column; gap: 14px; }
  .ft-links { align-items: flex-start; gap: 8px; }
  .ft-sub { font-size: 11.5px; }
}

/* ── Pages statiques (mentions légales, confidentialité) ─ */
.static-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px;
  line-height: 1.65;
  color: var(--text);
}
.static-page h1 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.static-page h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--cci-blue);
  margin: 22px 0 8px;
}
.static-page p, .static-page li { font-size: 13.5px; margin-bottom: 10px; }
.static-page ul { padding-left: 22px; margin-bottom: 12px; }
.static-page a { color: var(--cci-blue); }
.static-page .lead { color: var(--text-muted); font-size: 13px; margin-bottom: 20px; }
.static-page .back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  margin-bottom: 18px;
  color: var(--cci-blue);
  text-decoration: none;
}
.static-page .back-link:hover { text-decoration: underline; }

/* ── Utilitaires ────────────────────────────────────────── */
.hidden { display: none !important; }
.muted { color: var(--text-muted); }
.small { font-size: 11px; }
