/* ============================================================
   SqlMastR — nouveau design "1a" (SaaS moderne)
   ============================================================ */

:root {
  --navy: #0f1f33;
  --navy-light: #16304f;
  --blue-accent: #2e6da4;
  --blue-accent-dark: #235a89;
  --orange: #e67e22;
  --orange-dark: #cf6d16;
  --bg: #ffffff;
  --bg-alt: #f6f8fb;
  --bg-alt-2: #eef2f7;
  --text: #16202b;
  --text-light: #5b6675;
  --text-lighter: #8792a1;
  --border: #e3e8ef;
  --shadow-sm: 0 1px 3px rgba(15, 31, 51, 0.06), 0 1px 2px rgba(15, 31, 51, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 31, 51, 0.10), 0 2px 8px rgba(15, 31, 51, 0.06);
  --shadow-lg: 0 20px 48px rgba(15, 31, 51, 0.16), 0 4px 12px rgba(15, 31, 51, 0.08);
  --radius: 14px;
  --radius-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Bascule de langue ---------- */
/* Repli avant l'execution du script JS (FR par defaut) */
[data-lang="en"] { display: none; }
/* Ces regles CSS assurent la bascule meme si, pour une raison quelconque, le
   JS ne s'execute pas (cache, erreur, etc.) : elles ne servent qu'a MASQUER
   la langue inactive (jamais a forcer un display precis), ce qui laisse
   chaque element garder son display propre (inline-block d'un bouton, flex,
   etc.) une fois visible. */
html.lang-fr [data-lang="en"] { display: none !important; }
html.lang-en [data-lang="fr"] { display: none !important; }
/* Cas des elements sans classe (titres, listes, paragraphes bruts), ou dont
   la classe ne definit pas elle-meme de display (hero-desc, sous-titre,
   etiquette-cohorte, etc.) : ils n'ont pas de regle de composant pour
   reprendre un display apres le masquage par defaut ci-dessus ; on leur
   redonne explicitement leur affichage naturel quand la langue active
   correspond. */
html.lang-en [data-lang="en"]:not([class]),
html.lang-en [data-lang="en"].hero-desc,
html.lang-en [data-lang="en"].hero-reassurance,
html.lang-en [data-lang="en"].sous-titre,
html.lang-en [data-lang="en"].dates-cle,
html.lang-en [data-lang="en"].etiquette-cohorte,
html.lang-en [data-lang="en"].meta-extra,
html.lang-en [data-lang="en"].carte-lien,
html.lang-en [data-lang="en"].bio,
html.lang-en [data-lang="en"].table-demo { display: revert !important; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.conteneur {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--blue-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { color: var(--navy); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
h2 { font-size: 1.7rem; margin-top: 2.4rem; }
h3 { font-size: 1.15rem; }

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

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-dark { background: var(--navy); color: #fff; box-shadow: var(--shadow-sm); }
.btn-dark:hover { background: var(--navy-light); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--border); }
.btn-outline:hover { border-color: var(--navy); background: var(--bg-alt); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }

/* ---------- Header ---------- */
.site-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 24px;
  position: relative;
}
.logo-lien { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo-img { height: 32px; width: 32px; object-fit: contain; border-radius: 6px; }
.logo-texte { font-size: 1.4rem; font-weight: 900; color: var(--text); letter-spacing: -0.03em; }
.logo-texte .accent { color: var(--blue-accent); }
.nav-principale { display: flex; align-items: center; gap: 28px; }
.nav-principale a {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  display: inline-block;
}
.nav-principale a:hover { color: var(--blue-accent); }
.header-actions { display: flex; align-items: center; gap: 14px; }

.lang-toggle {
  display: inline-flex;
  background: var(--bg-alt-2);
  border-radius: 999px;
  padding: 3px;
  border: 1px solid var(--border);
}
.lang-toggle button, .pied-langue button {
  border: none;
  background: transparent;
  color: var(--text-light);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 6px 13px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.03em;
}
.lang-toggle button.actif, .pied-langue button.actif {
  background: var(--navy);
  color: #fff;
}

.menu-mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1.3rem;
  padding: 4px 10px;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--bg-alt) 0%, #ffffff 100%);
  padding: 64px 0 56px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero-label {
  color: var(--blue-accent);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: block;
}
.hero h1 {
  font-size: 2.9rem;
  margin: 0 0 18px;
  color: var(--text);
}
.hero p.hero-desc {
  color: var(--text-light);
  font-size: 1.12rem;
  margin: 0 0 28px;
  max-width: 46ch;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.hero-reassurance { color: var(--text-lighter); font-size: 0.88rem; }

/* ---------- Carte cohorte ---------- */
.carte-cohorte {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  padding: 28px;
}
.carte-cohorte-tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.etiquette-cohorte {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-lighter);
  text-transform: uppercase;
}
.badge {
  display: inline-block;
  background: #fdf1e6;
  color: var(--orange-dark);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid #f6ddc0;
}
.carte-cohorte h3 {
  margin: 4px 0 2px;
  font-size: 1.25rem;
  color: var(--navy);
}
.carte-cohorte .sous-titre {
  color: var(--text-light);
  font-size: 0.9rem;
  margin: 0 0 16px;
}
.carte-cohorte .dates-cle {
  color: var(--blue-accent);
  font-weight: 800;
  font-size: 1.02rem;
  margin: 0 0 10px;
}
.infos-pratiques {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.infos-pratiques li {
  font-size: 0.88rem;
  color: var(--text-light);
  display: flex;
  gap: 8px;
}
.infos-pratiques li strong { color: var(--text); font-weight: 700; }
.autres-dates {
  border-top: 1px dashed var(--border);
  margin-top: 14px;
  padding-top: 14px;
  font-size: 0.85rem;
  color: var(--text-light);
}
.autres-dates strong { color: var(--text); }

/* ---------- Logos de confiance ---------- */
.section-logos { padding: 44px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.section-logos .hero-label { text-align: center; display: block; margin-bottom: 26px; }
.logos-grille {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 36px 48px;
}
.logos-grille img, .logo-entreprise {
  max-height: 34px;
  max-width: 130px;
  object-fit: contain;
  filter: opacity(0.82);
  transition: filter 0.15s ease;
}
.logos-grille img:hover { filter: opacity(1); }

.logos-defilement { overflow: hidden; margin: 24px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.ligne-defilement { display: flex; overflow: hidden; }
.groupe-logos { display: flex; align-items: center; gap: 40px; padding-right: 40px; animation: defiler 72s linear infinite; flex-shrink: 0; }
.ligne-defilement.ligne-2 .groupe-logos { animation-duration: 72s; }
.ligne-defilement + .ligne-defilement { margin-top: 22px; }
@keyframes defiler { from { transform: translateX(0); } to { transform: translateX(-100%); } }
.logo-item { display: flex; align-items: center; }
.logo-item img.logo-entreprise { max-height: 30px; max-width: 120px; filter: opacity(0.82); transition: filter 0.15s ease; }
.logo-item img.logo-entreprise:hover { filter: opacity(1); }

/* ---------- Stats ---------- */
.section-stats { padding: 60px 0; }
.chiffres-cles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin: 30px 0;
}
.chiffre-item { text-align: center; padding: 8px; }
/* Sur les pages a 6 statistiques (2 rangees de 4 + 2), on decale la
   2e rangee d'une colonne pour la centrer visuellement au lieu de la
   laisser plaquee a gauche. */
.chiffres-cles--six .chiffre-item:nth-child(5) { grid-column: 2; }
.chiffres-cles--six .chiffre-item:nth-child(6) { grid-column: 3; }
.chiffre-valeur {
  display: block;
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.chiffre-item:nth-child(odd) .chiffre-valeur { color: var(--blue-accent); }
.chiffre-label { display: block; color: var(--text-light); font-size: 0.92rem; margin-top: 6px; }

/* ---------- Sections génériques ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); }
.section-tete { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-tete h2 { margin-top: 0; }
.section-tete p { color: var(--text-light); }

/* ---------- Grille de cartes ---------- */
.grille-cartes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grille-cartes--sept .carte:nth-child(7) { grid-column: 2; }
.carte {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.carte:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.carte h3 { margin-top: 0; font-size: 1.1rem; }
.carte h3 a { color: var(--navy); text-decoration: none; }
.carte p { color: var(--text-light); font-size: 0.94rem; margin: 8px 0 14px; }
.carte .carte-lien { font-weight: 700; font-size: 0.9rem; }
.carte-numero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--bg-alt-2);
  color: var(--blue-accent);
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 12px;
}
.categorie-chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--blue-accent);
  background: #eaf2f9;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

/* ---------- CTA final ---------- */
.cta-final {
  background: var(--navy);
  border-radius: var(--radius);
  color: #fff;
  padding: 48px;
  text-align: center;
  margin: 20px auto 0;
}
.cta-final h2 { color: #fff; margin-top: 0; }
.cta-final p { color: #c7d1de; max-width: 50ch; margin: 0 auto 26px; }
.cta-final .btn-outline { color: #fff; border-color: rgba(255,255,255,0.35); }
.cta-final .btn-outline:hover { background: rgba(255,255,255,0.08); border-color: #fff; }

/* ---------- Contenu article (pages internes) ---------- */
.page-hero {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 44px 0 36px;
}
.page-hero .categorie {
  display: inline-block;
  color: var(--orange-dark);
  background: #fdf1e6;
  border: 1px solid #f6ddc0;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.page-hero h1 { margin: 0 0 8px; font-size: 2.1rem; }
.page-hero .meta-extra { color: var(--text-light); font-size: 0.9rem; }

.contenu-grille { display: grid; grid-template-columns: 2.2fr 1fr; gap: 44px; padding: 44px 0; align-items: start; }

.article-complet h2 { font-size: 1.4rem; }
.article-complet p, .article-complet li { color: var(--text); }
.texte-justifie p { text-align: justify; text-justify: inter-word; }
.article-complet code {
  background: var(--bg-alt-2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--blue-accent-dark);
}
.article-complet pre {
  background: var(--navy);
  color: #eef4fb;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.55;
}
.article-complet pre code { background: none; color: inherit; padding: 0; }

.table-scroll { overflow-x: auto; }
.table-demo {
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0 28px;
  font-size: 0.92rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.table-demo th, .table-demo td {
  border: 1px solid var(--border);
  padding: 9px 13px;
  text-align: left;
}
.table-demo th { background: var(--bg-alt-2); color: var(--navy); font-weight: 700; }
.table-formations img.logo-entreprise { filter: none; max-height: 26px; }

.encadre-astuce {
  background: #fdf1e6;
  border: 1px solid #f6ddc0;
  border-left: 4px solid var(--orange);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 0.94rem;
}
.encadre-astuce strong { color: var(--orange-dark); }

.navigation-article {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-weight: 700;
}

.sidebar section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 20px;
}
.sidebar h3 { margin-top: 0; font-size: 1rem; }
.sidebar ul { padding-left: 18px; margin: 0; }
.sidebar li { margin-bottom: 6px; font-size: 0.92rem; }
.sidebar .bio { color: var(--text-light); font-size: 0.9rem; }

/* ---------- Formulaire de contact ---------- */
.formulaire-contact {
  max-width: 560px;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.champ-groupe { display: flex; flex-direction: column; gap: 6px; }
.champ-groupe label { font-weight: 700; font-size: 0.9rem; color: var(--navy); }
.champ-groupe input, .champ-groupe select, .champ-groupe textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 0.95rem;
  font-family: var(--font);
  background: #fff;
  color: var(--text);
}
.champ-groupe input:focus, .champ-groupe select:focus, .champ-groupe textarea:focus {
  outline: none;
  border-color: var(--blue-accent);
  box-shadow: 0 0 0 3px rgba(46, 109, 164, 0.15);
}
.erreur-message { display: none; color: #c0392b; font-size: 0.82rem; }
.champ-groupe-erreur input, .champ-groupe-erreur select, .champ-groupe-erreur textarea { border-color: #c0392b; }
.champ-groupe-erreur .erreur-message { display: block; }
.bouton-envoyer {
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 13px 24px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  width: fit-content;
}
.bouton-envoyer:hover { background: var(--navy-light); }
.bouton-envoyer:disabled { opacity: 0.6; cursor: default; }
.statut-formulaire { font-size: 0.9rem; margin: 0; }
.statut-succes { color: #1c7c3c; }
.statut-erreur { color: #c0392b; }

/* ---------- Coordonnées (contact) ---------- */
.coordonnees-grille { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 24px 0 36px; }
.coordonnee-carte {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}
.coordonnee-carte h4 { margin: 0 0 6px; font-size: 0.95rem; }
.coordonnee-carte p { margin: 0; color: var(--text-light); font-size: 0.92rem; }

/* ---------- Footer ---------- */
/* ---------- Banderole publicitaire ---------- */
.bandeau-publicite {
  position: relative;
  min-height: 90px;
  margin: 40px auto 0;
  padding: 22px 12px 14px;
  background: var(--bg-alt);
  border: 1px dashed var(--border);
  border-radius: 8px;
  text-align: center;
}
.bandeau-publicite-etiquette {
  position: absolute;
  top: 8px;
  left: 12px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-lighter);
}

.site-footer { background: var(--navy); color: #c7d1de; margin-top: 60px; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  padding: 48px 24px 28px;
  flex-wrap: wrap;
}
.footer-logo-lien { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.footer-logo-img { height: 28px; width: 28px; object-fit: contain; border-radius: 6px; }
.footer-brand .logo-texte { color: #fff; }
.footer-brand .logo-texte .accent { color: #7fb2df; }
.footer-brand p { color: #9fadc0; max-width: 32ch; font-size: 0.9rem; margin-top: 10px; }
.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { color: #c7d1de; font-size: 0.92rem; }
.footer-nav a:hover { color: #fff; }
.footer-lang { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.pied-langue { display: inline-flex; background: rgba(255,255,255,0.08); border-radius: 999px; padding: 3px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 18px 24px;
  font-size: 0.82rem;
  color: #8ea0b8;
  text-align: center;
}
.maj-date { display: inline-block; margin-left: 10px; padding-left: 10px; border-left: 1px solid rgba(255,255,255,0.18); color: #708299; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero h1 { font-size: 2.2rem; }
  .contenu-grille { grid-template-columns: 1fr; }
  .grille-cartes { grid-template-columns: repeat(2, 1fr); }
  .grille-cartes--sept .carte:nth-child(7) { grid-column: auto; }
  .chiffres-cles { grid-template-columns: repeat(2, 1fr); }
  .chiffres-cles--six .chiffre-item:nth-child(5),
  .chiffres-cles--six .chiffre-item:nth-child(6) { grid-column: auto; }
  .coordonnees-grille { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-principale { display: none; }
  .menu-mobile-toggle { display: inline-block; }
  .header-actions .btn-dark { display: none; }
  body.menu-ouvert .nav-principale {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 16px;
    box-shadow: var(--shadow-md);
  }
  body.menu-ouvert .header-actions .btn-dark { display: inline-flex; }
  .grille-cartes { grid-template-columns: 1fr; }
  .grille-cartes--sept .carte:nth-child(7) { grid-column: auto; }
  .footer-inner { flex-direction: column; }
}

@media (max-width: 520px) {
  .chiffres-cles { grid-template-columns: 1fr 1fr; gap: 20px; }
  .chiffre-valeur { font-size: 2rem; }
  .hero h1 { font-size: 1.9rem; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
}
