/* IDx Solution — feuille de style du site vitrine (idx.ma).
   Fichier statique, écrit à la main, sans dépendance externe.
   Mêmes jetons que l'application (style/ui.css) : ink, muted, paper, line, accent, danger. */

:root {
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --paper: #f5f5f7;
  --line: #d2d2d7;
  --accent: #0071e3;
  --accent-dark: #0077ed;
  --accent-deep: #0058b0;
  --danger: #e30000;
  --succes: #047857;
  --police: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--police);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); }
button, input, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.hidden { display: none !important; }

.wrap { max-width: 1152px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }

/* ───────── Barre du haut ───────── */
.entete {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.entete .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.marque { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.marque:hover { color: var(--ink); }
.marque img { width: 32px; height: 32px; }
.nav { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.nav a:not(.bouton) { color: var(--muted); }
.nav a:not(.bouton):hover { color: var(--ink); }
.lien-masque { display: none; }
@media (min-width: 640px) { .lien-masque { display: inline; } }

/* ───────── Boutons ───────── */
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.05s ease;
}
.bouton:active { transform: scale(0.99); }
.bouton:disabled { opacity: 0.7; cursor: progress; }
.bouton--principal { background: var(--accent); color: #fff; }
.bouton--principal:hover { background: var(--accent-dark); color: #fff; }
.bouton--texte { background: transparent; color: var(--accent); }
.bouton--texte:hover { background: rgba(0, 113, 227, 0.06); color: var(--accent-deep); }
.bouton--petit { height: 36px; padding: 0 16px; font-size: 14px; }
.bouton--bloc { width: 100%; }

/* ───────── Accueil ───────── */
.accueil { position: relative; overflow: hidden; padding: 72px 0 96px; text-align: center; }
.accueil::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 520px;
  pointer-events: none;
  background: radial-gradient(60% 60% at 50% 0%, rgba(0, 113, 227, 0.12), rgba(0, 113, 227, 0) 70%);
}
.accueil > .wrap { position: relative; max-width: 960px; }
.accueil-logo { width: 96px; height: 96px; margin: 0 auto; filter: drop-shadow(0 6px 16px rgba(0, 113, 227, 0.18)); }
.accueil h1 {
  margin: 32px 0 0;
  font-size: clamp(40px, 7vw, 64px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
}
.accueil .sous-titre {
  max-width: 600px;
  margin: 24px auto 0;
  font-size: clamp(19px, 2.4vw, 21px);
  line-height: 1.4;
  color: var(--muted);
}
.actions { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 36px; }
@media (min-width: 640px) { .actions { flex-direction: row; justify-content: center; } }
.actions .bouton { width: 100%; }
@media (min-width: 640px) { .actions .bouton { width: auto; } }

/* ───────── Sections ───────── */
.section { padding: 96px 0; }
.section--paper { background: var(--paper); }
.section h2 {
  margin: 0;
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-align: center;
}
.section .sous { max-width: 560px; margin: 16px auto 0; font-size: 17px; line-height: 1.5; color: var(--muted); text-align: center; }

/* Cartes modules */
.grille { display: grid; gap: 20px; margin-top: 56px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grille { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grille { grid-template-columns: repeat(3, 1fr); } }
.carte { padding: 32px; border-radius: 24px; background: #fff; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04); }
.pictogramme {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(0, 113, 227, 0.08);
  color: var(--accent);
}
.pictogramme svg { width: 24px; height: 24px; }
.carte h3 { margin: 20px 0 0; font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.carte p { margin: 8px 0 0; font-size: 15px; line-height: 1.55; color: var(--muted); }

/* Sécurité */
.securite { display: grid; gap: 40px; margin-top: 56px; }
@media (min-width: 900px) { .securite { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.securite article { text-align: center; }
.securite h3 { margin: 20px 0 0; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.securite p { max-width: 320px; margin: 8px auto 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.securite .pictogramme { margin: 0 auto; }

/* ───────── Contact ───────── */
.contact { max-width: 620px; margin: 0 auto; }
.formulaire, .succes {
  margin-top: 40px;
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.05);
}
@media (min-width: 640px) { .formulaire { padding: 32px; } }
.succes { text-align: center; }
.succes .pictogramme { margin: 0 auto; background: #ecfdf5; color: var(--succes); }
.succes p { margin: 16px 0 0; font-size: 17px; font-weight: 500; }

.grille-form { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grille-form { grid-template-columns: 1fr 1fr; } }
.champ { display: flex; flex-direction: column; }
.champ label { margin-bottom: 6px; font-size: 13px; font-weight: 500; }
.obligatoire { color: var(--danger); }
.saisie {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.saisie::placeholder { color: rgba(110, 110, 115, 0.7); }
.saisie:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15); }
.saisie[aria-invalid="true"] { border-color: var(--danger); }
textarea.saisie { height: auto; min-height: 130px; padding: 12px 16px; resize: vertical; }
.erreur { min-height: 1.1em; margin: 4px 4px 12px; font-size: 12px; color: var(--danger); }
.alerte {
  margin-bottom: 20px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #fff2f2;
  color: var(--danger);
  font-size: 14px;
  line-height: 1.4;
}
.verif { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.question {
  flex-shrink: 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--paper);
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.verif .saisie { width: 112px; }
.lien-discret { padding: 0; border: 0; background: none; color: var(--accent); font-size: 13px; cursor: pointer; }
.lien-discret:hover { text-decoration: underline; }
.piege { position: absolute; left: -9999px; width: 0; height: 0; overflow: hidden; }
.bas-formulaire { margin: 16px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); text-align: center; }
.spin { width: 20px; height: 20px; animation: tourne 0.9s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } html { scroll-behavior: auto; } }

/* ───────── Pied de page ───────── */
.pied { padding: 32px 0; border-top: 1px solid rgba(0, 0, 0, 0.06); color: var(--muted); font-size: 13px; text-align: center; }
.pied a { color: var(--muted); }
.pied a:hover { color: var(--ink); }
.pied .wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
@media (min-width: 640px) { .pied .wrap { flex-direction: row; justify-content: space-between; } }
.pied-liens { display: flex; gap: 18px; }
