/* ==========================================================================
   PORTAIL IGE — STYLE INSTITUTIONNEL PREMIUM
   Inspiré des standards d'excellence républicaine Naatal SG
   ========================================================================== */

:root {
  --ige-navy: #081a2e;
  --ige-navy-2: #0e2742;
  --ige-navy-dark: #05101d;
  --ige-ink: #112233;
  --ige-muted: #5a6e85;
  --ige-sand: #e6ddce;
  --ige-cream: #f4efe6;
  --ige-paper: #faf8f5;
  --ige-gold: #cba358;
  --ige-gold-light: #f7edd4;
  --ige-gold-deep: #a88132;
  --ige-lime: #d9ed72;
  --ige-clay: #c86c51;
  --ige-green: #0d6b3b;
  --ige-line: rgba(8, 26, 46, 0.12);
  --ige-line-light: rgba(255, 255, 255, 0.14);
  --ige-radius: 18px;
}

.ige-portal-page {
  font-family: 'DM Sans', Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ige-ink);
  background: var(--ige-paper);
  line-height: 1.6;
  overflow-x: hidden;
}

.ige-portal-page * { box-sizing: border-box; }

.ige-portal-page h1, 
.ige-portal-page h2, 
.ige-portal-page h3,
.ige-serif {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.025em;
  margin-top: 0;
}

.ige-container {
  width: calc(100% - 48px);
  max-width: 1200px;
  margin: 0 auto;
}

/* --- DÉCALAGE ANCRES SOUS HEADER FIXE & SMOOTH SCROLL --- */
html {
  scroll-behavior: smooth;
}
section[id], div[id], [id] {
  scroll-margin-top: 130px;
}

/* --- SUPPRESSION HEADER ODOO PAR DÉFAUT sur pages IGE --- */
/* Le header Odoo website (/my/ige, /ige) peut chevaucher notre navbar custom */
body:has(.ige-portal-page) #top,
body:has(.ige-portal-page) .o_header_standard,
body:has(.ige-portal-page) header.o_header_standard,
body:has(.ige-portal-page) .o_top_menu {
  display: none !important;
}
body:has(.ige-portal-page) {
  padding-top: 0 !important;
}

/* --- NAVIGATION PRINCIPALE (UNE SEULE LIGNE, HAUT CONTRASTE, ZERO DÉBORDEMENT) --- */
.ige-nav {
  position: fixed;
  z-index: 1000;
  top: 38px;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  border-bottom: 2px solid var(--ige-gold);
  color: #ffffff;
  background: #081a2e;       /* Fond bleu marine profond opaque */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}
.ige-nav .ige-container {
  width: 100%;
  max-width: 1440px;
  padding: 0 20px;
  box-sizing: border-box;
  margin: 0 auto;
}
.ige-nav-inner {
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;         /* Force une seule ligne */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;          /* Empêche formellement tout débordement à droite */
}
.ige-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  color: #ffffff !important;
  flex-shrink: 0;            /* Ne rétrécit pas */
  min-width: 0;
}
.ige-brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--ige-gold) 0%, var(--ige-gold-deep) 100%);
  color: var(--ige-navy-dark);
  font-family: 'DM Mono', monospace;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 14px rgba(203, 163, 88, 0.35);
}
.ige-brand-copy {
  min-width: 0;
}
.ige-brand-copy strong {
  display: block;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff !important;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.ige-brand-copy small {
  display: block;
  font-size: 0.68rem;
  color: #f7edd4 !important; /* Or clair chaleureux : contraste parfait */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.ige-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 1 auto;
  justify-content: center;
  white-space: nowrap;
  min-width: 0;
}
.ige-nav-links a {
  color: #ffffff !important; /* Blanc pur */
  text-decoration: none !important;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 6px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.ige-nav-links a:hover,
.ige-nav-links a:focus {
  color: #ffd700 !important; /* Or éclatant au survol */
  background: rgba(255, 255, 255, 0.14);
}
.ige-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;            /* Reste dans la page */
}

/* Bouton toggle thème */
.ige-theme-toggle {
  background: rgba(255, 255, 255, 0.14);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  color: #ffffff !important;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.ige-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: #ffd700;
  color: #ffd700 !important;
}

/* --- BANDEAU ANNONCE SUPÉRIEUR (FIXÉ EN HAUT) --- */
.ige-announcement {
  position: fixed;
  z-index: 1001;
  top: 0;
  left: 0;
  width: 100%;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--ige-gold);
  color: var(--ige-navy-dark);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
}
.ige-announcement .ige-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a12d1b;
  display: inline-block;
  flex-shrink: 0;
}


/* --- BOUTONS --- */
.ige-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.25s ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.ige-btn-gold {
  background: #d4a853;
  color: #05101d !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(212, 168, 83, 0.4);
}
.ige-btn-gold:hover {
  background: #deb972;
  color: #05101d !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(212, 168, 83, 0.6);
}
.ige-btn-ghost {
  background: rgba(255, 255, 255, 0.14);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  color: #ffffff !important;
  font-weight: 600;
}
.ige-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: #ffffff;
  color: #ffffff !important;
}
.ige-btn-primary {
  background: var(--ige-navy);
  color: #ffffff !important;
}
.ige-btn-primary:hover {
  background: var(--ige-navy-2);
  transform: translateY(-2px);
}

/* --- SECTION HERO STYLE NAATAL SG --- */
/* padding-top = bandeau(38px) + navbar(72px) + espace visuel(60px) = 170px */
.ige-hero-sg {
  position: relative;
  background: radial-gradient(circle at 80% 20%, rgba(203, 163, 88, 0.18), transparent 40%),
              linear-gradient(135deg, var(--ige-navy-dark) 0%, var(--ige-navy) 60%, #0d324f 100%);
  color: #fff;
  padding: 170px 0 90px;
  overflow: hidden;
}
.ige-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.ige-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}
.ige-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(203, 163, 88, 0.15);
  border: 1px solid rgba(203, 163, 88, 0.35);
  color: #f7edd4;
  font-family: 'DM Mono', monospace;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
/* Variante pour les sections sur fond clair */
.ige-kicker-light {
  background: rgba(8, 26, 46, 0.07);
  border-color: rgba(8, 26, 46, 0.15);
  color: var(--ige-navy);
}
[data-ige-theme="dark"] .ige-kicker-light {
  background: rgba(203, 163, 88, 0.15) !important;
  border-color: rgba(203, 163, 88, 0.35) !important;
  color: var(--ige-gold) !important;
}
.ige-hero-copy h1 {
  font-size: clamp(2.4rem, 4.2vw, 3.8rem);
  line-height: 1.08;
  color: #ffffff;
  margin-bottom: 20px;
}
.ige-hero-copy h1 em {
  font-style: normal;
  color: var(--ige-gold);
}
.ige-hero-lede {
  font-size: 1.15rem;
  line-height: 1.65;
  color: #cbd5e1;
  max-width: 600px;
  margin-bottom: 32px;
}
.ige-hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 36px;
}
.ige-hero-proof {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.86rem;
  color: #94a3b8;
}
.ige-hero-proof span i {
  color: var(--ige-gold);
  font-style: normal;
  font-weight: bold;
}

/* --- CONSOLE INTERACTIVE DE PILOTAGE --- */
.ige-console {
  background: rgba(14, 39, 66, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--ige-radius);
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px);
}
.ige-console-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  color: #94a3b8;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
}
.ige-live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  margin-right: 6px;
}
.ige-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.ige-metric-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 12px;
}
.ige-metric-card span {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.ige-metric-card strong {
  display: block;
  font-size: 1.6rem;
  color: #ffffff;
  font-family: 'DM Sans', sans-serif;
  line-height: 1.1;
  margin-bottom: 4px;
}
.ige-metric-card small {
  font-size: 0.74rem;
}
.ige-metric-card small.pos { color: #4ade80; }
.ige-metric-card small.urg { color: #f87171; }

.ige-bars-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #cbd5e1;
  margin-bottom: 14px;
}
.ige-bars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  align-items: flex-end;
  height: 110px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 14px;
}
.ige-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.ige-bar-col .bar {
  width: 100%;
  max-width: 38px;
  background: linear-gradient(180deg, var(--ige-gold) 0%, rgba(203, 163, 88, 0.3) 100%);
  border-radius: 4px 4px 0 0;
}
.ige-bar-col label {
  font-size: 0.72rem;
  color: #94a3b8;
  font-family: 'DM Mono', monospace;
  text-align: center;
}

/* --- CLASSES ADAPTATIVES CLAIR/SOMBRE --- */
.ige-heading-adaptive {
  color: var(--ige-navy);
}
.ige-text-adaptive {
  color: var(--ige-ink);
}
.ige-text-muted-adaptive {
  color: var(--ige-muted);
}
.ige-guide-box {
  background: #ffffff;
  border: 1px solid var(--ige-line);
}
.ige-alert-info-adaptive {
  background: var(--ige-cream);
  border: 1px solid var(--ige-line);
  color: var(--ige-muted);
}

/* Mode sombre — surcharge des classes adaptatives */
[data-ige-theme="dark"] .ige-heading-adaptive { color: #f0f6ff !important; }
[data-ige-theme="dark"] .ige-text-adaptive { color: #e2e8f0 !important; }
[data-ige-theme="dark"] .ige-text-muted-adaptive { color: #94a3b8 !important; }
[data-ige-theme="dark"] .ige-guide-box {
  background: #0e2238 !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
}
[data-ige-theme="dark"] .ige-alert-info-adaptive {
  background: #0b1a2d !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
  color: #94a3b8 !important;
}

/* --- SECTIONS DE CONTENU --- */
.ige-section {
  padding: 90px 0;
}
.ige-section-alt {
  background-color: var(--ige-cream);
}
.ige-section-head {
  margin-bottom: 50px;
}
.ige-section-head h2 {
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  color: var(--ige-navy);
  margin-top: 10px;
  margin-bottom: 14px;
}
.ige-section-head p {
  font-size: 1.15rem;
  color: var(--ige-muted);
  max-width: 720px;
}

/* --- CARTES DE FONCTIONNALITÉS --- */
.ige-card-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.ige-card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.ige-card-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.ige-feature-card {
  background: #ffffff;
  border: 1px solid var(--ige-line);
  border-radius: var(--ige-radius);
  padding: 32px 26px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
}
.ige-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(8, 26, 46, 0.08);
}
.ige-feature-card .icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--ige-gold-light);
  color: var(--ige-navy);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
}
.ige-feature-card h3 {
  font-size: 1.35rem;
  color: var(--ige-navy);
  margin-bottom: 10px;
}
.ige-feature-card p {
  color: var(--ige-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* --- SYNERGIE IGE & IAAF --- */
.ige-synergy-box {
  background: linear-gradient(135deg, var(--ige-navy-dark) 0%, var(--ige-navy) 100%);
  border-radius: 24px;
  color: #ffffff;
  padding: 56px 48px;
}
.ige-synergy-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.ige-synergy-box h2 {
  font-size: 2.6rem;
  color: #ffffff;
  margin-bottom: 18px;
}
.ige-synergy-box p {
  color: #cbd5e1;
  font-size: 1.1rem;
}

/* --- ÉTAPES D'UNE MISSION --- */
.ige-step-box {
  background: #ffffff;
  border: 1px solid var(--ige-line);
  border-radius: var(--ige-radius);
  padding: 30px 24px;
  height: 100%;
}
.ige-step-badge {
  font-family: 'DM Mono', monospace;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--ige-gold);
  background: var(--ige-navy);
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 16px;
}
.ige-step-box h3 {
  font-size: 1.3rem;
  color: var(--ige-navy);
  margin-bottom: 10px;
}
.ige-step-box p {
  color: var(--ige-muted);
  font-size: 0.94rem;
  margin-bottom: 0;
}

/* --- PORTAIL USAGER : VISIO & ENRICHISSEMENT --- */
.ige-visio-card {
  background: linear-gradient(135deg, #092c4c 0%, #0d466e 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--ige-radius);
  color: #ffffff;
  padding: 28px;
  box-shadow: 0 16px 36px rgba(9, 44, 76, 0.2);
}
.ige-visio-btn {
  background: #22c55e;
  color: #ffffff !important;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none !important;
  transition: all 0.2s ease;
}
.ige-visio-btn:hover {
  background: #16a34a;
  transform: translateY(-2px);
}

.ige-timeline {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin: 36px 0 44px;
}
.ige-timeline:before {
  content: "";
  position: absolute;
  top: 18px;
  left: 24px;
  right: 24px;
  height: 3px;
  background: #e2e8f0;
  z-index: 1;
}
.ige-timeline-step {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 25%;
}
.ige-timeline-dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #cbd5e1;
  color: #647475;
  display: inline-grid;
  place-items: center;
  font-weight: 700;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}
.ige-timeline-step.active .ige-timeline-dot {
  border-color: var(--ige-gold);
  background: var(--ige-navy);
  color: var(--ige-gold);
  box-shadow: 0 0 0 6px rgba(203, 163, 88, 0.25);
}
.ige-timeline-step.done .ige-timeline-dot {
  border-color: #22c55e;
  background: #22c55e;
  color: #ffffff;
}
.ige-timeline-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ige-navy);
}

/* --- RÈGLES DE CONTRASTE MODE CLAIR (AUCUN TEXTE SOMBRE SUR FOND SOMBRE) --- */
.ige-portal-page {
  background: #f8fafc !important;
  color: #0f172a !important;
}
.ige-section {
  background: #f8fafc;
}
.ige-section-alt {
  background: #f1f5f9 !important;
}
.ige-feature-card,
.ige-step-box,
.ige-portal-card,
.ige-guide-box {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}
.ige-feature-card h3,
.ige-step-box h3,
.ige-section-head h2 {
  color: #081a2e !important;
}
.ige-feature-card p,
.ige-step-box p,
.ige-section-head p {
  color: #475569 !important;
}

/* Accordion FAQ — Mode clair garanti */
.ige-faq-accordion .accordion-item,
.accordion .accordion-item {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  overflow: hidden;
  margin-bottom: 12px;
}
.ige-faq-accordion .accordion-button,
.accordion .accordion-button {
  background: #ffffff !important;
  color: #081a2e !important;
  font-weight: 600 !important;
  font-size: 1.02rem !important;
  box-shadow: none !important;
}
.ige-faq-accordion .accordion-button:not(.collapsed),
.accordion .accordion-button:not(.collapsed) {
  background: #f1f5f9 !important;
  color: #081a2e !important;
  box-shadow: none !important;
}
.ige-faq-accordion .accordion-body,
.accordion .accordion-body {
  background: #ffffff !important;
  color: #334155 !important;
  font-size: 0.95rem !important;
  line-height: 1.65 !important;
}

/* Synergie IGE-IAAF — boîte marine avec contrastes stricts */
.ige-synergy-box {
  background: linear-gradient(135deg, #05101d 0%, #0d2d4e 100%) !important;
  color: #ffffff !important;
}
.ige-synergy-box h2 {
  color: #ffffff !important;
}
.ige-synergy-box p {
  color: #e2e8f0 !important;
}
.ige-synergy-box .text-white-50 {
  color: #cbd5e1 !important;
}
.ige-synergy-box .text-warning {
  color: #facc15 !important;
}
.ige-synergy-box .bg-white {
  background: #ffffff !important;
  color: #0f172a !important;
}
.ige-synergy-box .bg-white h3 {
  color: #081a2e !important;
}
.ige-synergy-box .bg-white span {
  color: #334155 !important;
}

/* --- PORTAIL USAGER IGE (.ige-portal-wrap) --- */
.ige-portal-wrap {
  background: #f8fafc !important;
  color: #0f172a !important;
  min-height: calc(100vh - 120px);
  padding: 30px 0;
}
.ige-portal-wrap h1, .ige-portal-wrap h2, .ige-portal-wrap h3 {
  color: #081a2e !important;
}
.ige-portal-wrap p, .ige-portal-wrap .text-muted {
  color: #475569 !important;
}
.ige-portal-wrap .card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
  box-shadow: 0 4px 20px rgba(8, 26, 46, 0.06) !important;
}
.ige-portal-wrap .form-label {
  color: #081a2e !important;
  font-weight: 600;
}
.ige-portal-wrap .form-control, .ige-portal-wrap .form-select {
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}
.ige-portal-wrap .form-control:focus, .ige-portal-wrap .form-select:focus {
  border-color: var(--ige-gold) !important;
  box-shadow: 0 0 0 3px rgba(203, 163, 88, 0.25) !important;
}
.ige-portal-wrap .form-text {
  color: #64748b !important;
}
.ige-portal-wrap .form-check {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #334155 !important;
}
.ige-portal-wrap .form-check-label {
  color: #334155 !important;
}
.ige-portal-wrap .table {
  color: #0f172a !important;
}
.ige-portal-wrap .table thead th {
  background: #f1f5f9 !important;
  color: #081a2e !important;
}

/* Mode sombre pour .ige-portal-wrap */
[data-ige-theme="dark"] .ige-portal-wrap {
  background: #06111f !important;
  color: #e2e8f0 !important;
}
[data-ige-theme="dark"] .ige-portal-wrap h1,
[data-ige-theme="dark"] .ige-portal-wrap h2,
[data-ige-theme="dark"] .ige-portal-wrap h3 {
  color: #ffffff !important;
}
[data-ige-theme="dark"] .ige-portal-wrap p,
[data-ige-theme="dark"] .ige-portal-wrap .text-muted {
  color: #94a3b8 !important;
}
[data-ige-theme="dark"] .ige-portal-wrap .card {
  background: #0e2238 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #e2e8f0 !important;
}
[data-ige-theme="dark"] .ige-portal-wrap .form-label {
  color: #f0f6ff !important;
}
[data-ige-theme="dark"] .ige-portal-wrap .form-control,
[data-ige-theme="dark"] .ige-portal-wrap .form-select {
  background-color: #0b1a2d !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}
[data-ige-theme="dark"] .ige-portal-wrap .form-text {
  color: #94a3b8 !important;
}
[data-ige-theme="dark"] .ige-portal-wrap .form-check {
  background: #0b1a2d !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #cbd5e1 !important;
}
[data-ige-theme="dark"] .ige-portal-wrap .form-check-label {
  color: #cbd5e1 !important;
}

/* --- THEME SOMBRE (CONTRASTES PARFAITS & ACCESSIBILITÉ WCAG AAA) --- */
[data-ige-theme="dark"] .ige-portal-page {
  background: #06111f !important;
  color: #e2e8f0 !important;
}
[data-ige-theme="dark"] .ige-section {
  background: #06111f !important;
  color: #e2e8f0 !important;
}
[data-ige-theme="dark"] .ige-section-alt {
  background: #0b1a2d !important;
  color: #e2e8f0 !important;
}
[data-ige-theme="dark"] .ige-section-head h2 {
  color: #ffffff !important;
}
[data-ige-theme="dark"] .ige-section-head p {
  color: #94a3b8 !important;
}

/* Cartes et boîtes de fonctionnalités */
[data-ige-theme="dark"] .ige-feature-card,
[data-ige-theme="dark"] .ige-step-box,
[data-ige-theme="dark"] .ige-portal-card {
  background: #0e2238 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #e2e8f0 !important;
}
[data-ige-theme="dark"] .ige-feature-card:hover {
  border-color: rgba(203, 163, 88, 0.45) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5) !important;
}
[data-ige-theme="dark"] .ige-feature-card h3,
[data-ige-theme="dark"] .ige-step-box h3 {
  color: #ffffff !important;
}
[data-ige-theme="dark"] .ige-feature-card p,
[data-ige-theme="dark"] .ige-step-box p {
  color: #94a3b8 !important;
}
[data-ige-theme="dark"] .ige-feature-card .icon-box {
  background: rgba(203, 163, 88, 0.2) !important;
  color: var(--ige-gold) !important;
}
[data-ige-theme="dark"] .ige-step-badge {
  background: #142f4c !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
}

/* Accordion FAQ en mode sombre */
[data-ige-theme="dark"] .accordion-item,
[data-ige-theme="dark"] .ige-faq-accordion .accordion-item {
  background: #0e2238 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}
[data-ige-theme="dark"] .accordion-button,
[data-ige-theme="dark"] .ige-faq-accordion .accordion-button {
  background: #0e2238 !important;
  color: #ffffff !important;
}
[data-ige-theme="dark"] .accordion-button:not(.collapsed),
[data-ige-theme="dark"] .ige-faq-accordion .accordion-button:not(.collapsed) {
  background: #142f4c !important;
  color: var(--ige-gold) !important;
}
[data-ige-theme="dark"] .accordion-button::after {
  filter: invert(1) brightness(2) !important;
}
[data-ige-theme="dark"] .accordion-body,
[data-ige-theme="dark"] .ige-faq-accordion .accordion-body {
  background: #0e2238 !important;
  color: #cbd5e1 !important;
}
[data-ige-theme="dark"] .accordion-body strong {
  color: #ffffff !important;
}

/* Synergie IGE-IAAF */
[data-ige-theme="dark"] .ige-synergy-box {
  background: linear-gradient(135deg, #05101d 0%, #0d2d4e 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}
[data-ige-theme="dark"] .ige-synergy-box .bg-white {
  background: #0e2238 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f1f5f9 !important;
}
[data-ige-theme="dark"] .ige-synergy-box .bg-white h3 {
  color: #ffffff !important;
}
[data-ige-theme="dark"] .ige-synergy-box .bg-white span,
[data-ige-theme="dark"] .ige-synergy-box .bg-white p,
[data-ige-theme="dark"] .ige-synergy-box .bg-white li {
  color: #cbd5e1 !important;
}
[data-ige-theme="dark"] .ige-synergy-box .bg-white strong {
  color: #ffffff !important;
}
[data-ige-theme="dark"] .ige-synergy-box .bg-white .text-dark {
  color: #f1f5f9 !important;
}
[data-ige-theme="dark"] .ige-synergy-box .bg-white .text-success {
  color: #4ade80 !important;
}

/* Espace citoyen & Guide de saisine */
[data-ige-theme="dark"] .ige-guide-box {
  background: #0e2238 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #e2e8f0 !important;
}
[data-ige-theme="dark"] .ige-guide-box .rounded-circle {
  background: #142f4c !important;
  color: var(--ige-gold) !important;
}
[data-ige-theme="dark"] .ige-alert-info-adaptive {
  background: #0b1a2d !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #cbd5e1 !important;
}
[data-ige-theme="dark"] .ige-heading-adaptive {
  color: #ffffff !important;
}
[data-ige-theme="dark"] .ige-text-adaptive {
  color: #e2e8f0 !important;
}
[data-ige-theme="dark"] .ige-text-muted-adaptive {
  color: #94a3b8 !important;
}

/* Boutons en mode sombre */
[data-ige-theme="dark"] .ige-btn-primary {
  background: #1e3a5f !important;
  border: 1.5px solid rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}
[data-ige-theme="dark"] .ige-btn-primary:hover {
  background: #254b7a !important;
  border-color: var(--ige-gold) !important;
  color: #ffffff !important;
}

/* Badges probatoires en mode sombre */
[data-ige-theme="dark"] .badge.text-bg-dark {
  background-color: #1e3a5f !important;
  color: #93c5fd !important;
  border: 1px solid rgba(147, 197, 253, 0.35) !important;
}
[data-ige-theme="dark"] .badge.text-bg-warning,
[data-ige-theme="dark"] .badge.text-bg-warning.text-dark {
  background-color: #f59e0b !important;
  color: #081a2e !important;
}
[data-ige-theme="dark"] .badge.text-bg-primary {
  background-color: #2563eb !important;
  color: #ffffff !important;
}
[data-ige-theme="dark"] .badge.text-bg-info {
  background-color: #0284c7 !important;
  color: #ffffff !important;
}

/* Textes et bordures utilitaires */
[data-ige-theme="dark"] .text-dark {
  color: #f1f5f9 !important;
}
[data-ige-theme="dark"] .text-muted {
  color: #94a3b8 !important;
}
[data-ige-theme="dark"] .text-white-50 {
  color: #cbd5e1 !important;
}
[data-ige-theme="dark"] .border,
[data-ige-theme="dark"] .border-top,
[data-ige-theme="dark"] .border-bottom {
  border-color: rgba(255, 255, 255, 0.12) !important;
}
[data-ige-theme="dark"] .table {
  color: #e2e8f0 !important;
}
[data-ige-theme="dark"] .table-light,
[data-ige-theme="dark"] .table thead th {
  background: #142f4c !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}
[data-ige-theme="dark"] .table td {
  border-color: rgba(255, 255, 255, 0.08) !important;
}
[data-ige-theme="dark"] .ige-kicker,
[data-ige-theme="dark"] .ige-kicker-light,
[data-ige-theme="dark"] .ige-section .ige-kicker,
[data-ige-theme="dark"] .ige-section-alt .ige-kicker {
  background: rgba(203, 163, 88, 0.15) !important;
  color: var(--ige-gold) !important;
  border-color: rgba(203, 163, 88, 0.35) !important;
}

/* =============================================
   RESPONSIVE — PROGRESSIF DESKTOP, LAPTOP, TABLETTE, MOBILE
   ============================================= */

/* --- Adaptation Grand Écran / Portable (≤ 1380px) : Zéro débordement --- */
@media (max-width: 1380px) {
  .ige-nav .ige-container {
    padding: 0 16px;
  }
  .ige-theme-toggle span[data-ige-theme-label] {
    display: none; /* Mode compact icône seule */
  }
  .ige-theme-toggle {
    padding: 6px 10px;
  }
  .ige-nav-links {
    gap: 2px;
  }
  .ige-nav-links a {
    font-size: 0.80rem;
    padding: 5px 6px;
  }
  .ige-btn-gold {
    padding: 7px 12px;
    font-size: 0.82rem;
  }
  .ige-btn-ghost {
    padding: 7px 10px;
    font-size: 0.82rem;
  }
}

/* --- Adaptation Écran Moyen / Laptop (≤ 1220px) --- */
@media (max-width: 1220px) {
  .ige-nav-actions .ige-btn-ghost {
    display: none; /* Masqué sur écran portable intermédiaire pour préserver 100% de la largeur */
  }
  .ige-brand-copy small {
    display: none; /* Masqué pour garder la marque sur 1 ligne compacte */
  }
  .ige-brand-copy strong {
    font-size: 0.90rem;
  }
}

/* --- Tablette (≤ 991px) --- */
@media (max-width: 991px) {
  /* Hero : padding adapté avec marge suffisante sous le header fixe (110px) */
  .ige-hero-sg {
    padding: 165px 0 60px;
  }
  .ige-hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .ige-hero-copy h1 {
    font-size: clamp(2rem, 5vw, 3rem);
  }

  /* CTA hero : wrap propre sans débordement */
  .ige-hero-buttons {
    flex-wrap: wrap;
    gap: 12px;
  }
  .ige-hero-buttons .ige-btn {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    justify-content: center;
    text-align: center;
    padding: 11px 18px;
    font-size: 0.88rem;
  }

  /* Proof bar */
  .ige-hero-proof {
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.82rem;
  }

  /* Console : passer en colonne */
  .ige-console {
    margin-top: 0;
  }
  .ige-metric-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .ige-metric-card strong {
    font-size: 1.3rem;
  }

  /* Synergy grid */
  .ige-synergy-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .ige-synergy-box {
    padding: 36px 24px;
  }

  /* Grilles de cartes */
  .ige-card-grid-4, .ige-card-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .ige-card-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* --- Mobile (≤ 767px) — RESPONSIVE TOPNAVBAR & ZERO DÉBORDEMENT --- */
@media (max-width: 767px) {
  /* Bandeau supérieur officiel compact */
  .ige-announcement {
    height: 30px;
    line-height: 30px;
    font-size: 9px;
    letter-spacing: 0.04em;
    padding: 0 10px;
  }

  /* Topnavbar compacte et fluide */
  .ige-nav {
    top: 30px;
  }
  .ige-nav-inner {
    height: 58px;
    padding: 0;
    gap: 8px;
  }
  .ige-container {
    width: 100%;
    max-width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
  }

  /* Marque IGE fluide ne débordant jamais */
  .ige-brand {
    flex: 1 1 auto;
    min-width: 0;
    gap: 8px;
  }
  .ige-brand-mark {
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
    border-radius: 8px;
    flex-shrink: 0;
  }
  .ige-brand-copy {
    min-width: 0;
    flex: 1;
    overflow: hidden;
  }
  .ige-brand-copy strong {
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .ige-brand-copy small {
    display: none; /* Masqué sur smartphone pour préserver la largeur */
  }

  /* Actions nav : seul le bouton burger reste visible, ancré à droite sans débordement */
  .ige-nav-actions {
    flex-shrink: 0;
    gap: 4px;
  }
  .ige-theme-toggle {
    display: none; /* Géré dans le drawer */
  }
  .ige-nav-actions .ige-btn-ghost,
  .ige-nav-actions .ige-btn-gold {
    display: none; /* Gérés dans le drawer */
  }
  .ige-burger {
    display: flex;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
  }

  /* DÉCALAGE DE LA PAGE SOUS LA NAVBAR : Header = 30px + 58px = 88px.
     Padding-top de 145px offre 57px de respiration au-dessus du kicker */
  .ige-hero-sg {
    padding: 145px 0 50px;
  }
  .ige-hero-lede {
    font-size: 1rem;
  }

  /* Décalage automatique pour tous les liens d'ancre lors du scroll */
  section[id], div[id], [id] {
    scroll-margin-top: 100px;
  }

  /* CTA sur mobile : boutons pleine largeur */
  .ige-hero-buttons {
    flex-direction: column;
    gap: 10px;
  }
  .ige-hero-buttons .ige-btn {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    font-size: 0.95rem;
  }

  /* Console stats : 2 colonnes */
  .ige-metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ige-bars-grid {
    grid-template-columns: repeat(4, 1fr);
    height: 80px;
  }

  /* Grilles : tout en 1 colonne */
  .ige-card-grid-4, .ige-card-grid-3, .ige-card-grid-2 {
    grid-template-columns: 1fr;
  }

  /* Sections */
  .ige-section {
    padding: 50px 0;
  }
  .ige-section-head {
    margin-bottom: 28px;
  }
  .ige-section-head h2 {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  /* Synergie */
  .ige-synergy-box {
    padding: 24px 16px;
    border-radius: 16px;
  }
  .ige-synergy-box h2 {
    font-size: 1.7rem;
  }
}

/* --- Petit mobile (≤ 480px) --- */
@media (max-width: 480px) {
  .ige-container {
    padding: 0 12px;
  }
  .ige-brand-copy strong {
    font-size: 0.86rem;
  }
  .ige-hero-sg {
    padding: 138px 0 40px;
  }
}


/* ============================================================
   HAMBURGER + DRAWER MOBILE (ajout correctif navbar)
   ============================================================ */

/* Bouton hamburger — caché par défaut sur desktop */
.ige-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  background: rgba(255, 255, 255, 0.16);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.ige-burger:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: #ffffff;
}
.ige-burger-bar {
  display: block;
  width: 22px;
  height: 2.5px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
/* Icône ✕ quand le menu est ouvert */
.ige-burger[aria-expanded="true"] .ige-burger-bar:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.ige-burger[aria-expanded="true"] .ige-burger-bar:nth-child(2) {
  opacity: 0;
}
.ige-burger[aria-expanded="true"] .ige-burger-bar:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Drawer mobile */
.ige-mobile-drawer {
  display: none; /* caché par défaut */
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 90vw);
  height: 100%;
  z-index: 1200;
  background: #081a2e;       /* Bleu marine opaque identique à la topbar */
  border-left: 2px solid var(--ige-gold);
  box-shadow: -6px 0 36px rgba(0, 0, 0, 0.6);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
.ige-mobile-drawer[aria-hidden="false"] {
  transform: translateX(0);
}
.ige-mobile-drawer-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 30px 24px 40px;
}

/* Bouton fermeture rond en haut du drawer */
.ige-burger-close {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-size: 1.1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}
.ige-burger-close:hover {
  background: rgba(255, 255, 255, 0.28);
  color: #ffd700;
  border-color: #ffd700;
}

.ige-mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ige-mobile-nav-links a {
  display: block;
  padding: 12px 16px;
  color: #ffffff !important; /* Blanc pur */
  text-decoration: none !important;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.18s, color 0.18s;
}
.ige-mobile-nav-links a:hover,
.ige-mobile-nav-links a:focus {
  background: rgba(255, 255, 255, 0.14);
  color: #ffd700 !important;
}

.ige-mobile-nav-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
}

/* Toggle thème dans le drawer mobile */
.ige-mobile-nav-cta .ige-theme-toggle {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #ffffff !important;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.ige-mobile-nav-cta .ige-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: #ffd700;
  color: #ffd700 !important;
}

/* Overlay de fermeture */
.ige-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1150;
  background: rgba(5, 16, 29, 0.65);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.ige-drawer-overlay.ige-overlay-visible {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* Bouton hamburger — haute priorité de clic */
.ige-burger {
  position: relative;
  z-index: 1250;
}

/* Neutraliser le debounce Odoo (minimal_dom.js ajoute pe-none après un clic) */
.ige-burger.pe-none {
  pointer-events: auto !important;
}

/* Drawer mobile au-dessus de l'overlay */
.ige-mobile-drawer {
  z-index: 1300;
}

/* ============================================================
   RESPONSIVE : afficher hamburger + drawer sur tablette/mobile (≤ 1120px)
   ============================================================ */
@media (max-width: 1120px) {
  /* Masquer les liens desktop sur tablette et mobile */
  .ige-nav-links {
    display: none;
  }
  /* Afficher le bouton hamburger */
  .ige-burger {
    display: flex;
  }
  /* Activer le drawer (block pour le positionnement fixed) */
  .ige-mobile-drawer {
    display: block;
  }
  /* Masquer les boutons longs de la topbar sur tablette (accessibles dans le drawer) */
  .ige-nav-actions .ige-btn-gold,
  .ige-nav-actions .ige-btn-ghost {
    display: none;
  }
  .ige-nav-inner {
    overflow: hidden;
  }
}

@media (max-width: 767px) {
  /* Sur mobile, masquer tous les boutons dans la topbar sauf le burger */
  .ige-nav-actions .ige-btn-ghost,
  .ige-nav-actions .ige-btn-gold,
  .ige-nav-actions .ige-theme-toggle {
    display: none !important;
  }
  /* Marque IGE compacte sans débordement */
  .ige-brand-copy small {
    display: none !important;
  }
  .ige-brand-copy strong {
    font-size: 0.88rem !important;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .ige-brand-mark {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.82rem !important;
  }
  /* Respiration au-dessus de la première section : 30px bandeau + 58px nav + 42px marge = 130px */
  .ige-hero-sg {
    padding: 130px 0 50px !important;
  }
  /* Décalage des ancres sous la navbar mobile */
  section[id], div[id], [id] {
    scroll-margin-top: 100px !important;
  }
}


