/* ═══════════ PORTAIL CANDIDAT — NOUVELLE MAQUETTE ÉDITORIALE ═══════════ */
html {
  scroll-padding-top: 96px;
}
[id], .zone, .offer-card, .offers-grid {
  scroll-margin-top: 96px;
}
.portal-body {
  background-color: #F8FAFC;
  font-family: var(--font, Arial, sans-serif);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}
*, *::before, *::after {
  box-sizing: border-box;
}

/* Header style additionnel */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 2rem;
  background: var(--surface, #FFFFFF);
  border-bottom: 1px solid var(--border, #E2E8F0);
}
.header__brand .marque {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--primary, #1E3D59);
}
.marque-logo { height: 52px; width: 52px; object-fit: contain; flex-shrink: 0; }
.marque-texte { display: flex; flex-direction: column; }
.marque-texte strong { font-size: 1.15rem; font-weight: 700; line-height: 1.15; color: var(--primary, #1E3D59); }
.marque-texte span { font-size: 0.82rem; color: var(--text-muted, #64748B); text-transform: uppercase; letter-spacing: 0.08em; line-height: 1.1; margin-top: 3px; }

.header__nav {
  display: flex;
  gap: 1.8rem;
}
.header__nav a {
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main, #334155);
  transition: color 0.15s ease;
}
.header__nav a:hover { color: var(--primary, #1E3D59); }

.header__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.lang-selector {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm, 6px);
  background: var(--surface-alt, #F1F5F9);
}

.portal-main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.5rem 2rem 2.5rem 2rem;
}

/* --- Grille principale (2 colonnes side-by-side) --- */
.portal-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

/* ═══════════ ZONES (BLEUE & OCRE) ═══════════ */
.zone {
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.zone--blue {
  background: linear-gradient(180deg, #F0F6FC 0%, #E8F1FA 100%);
  border: 1px solid #D5E4F3;
}
[data-theme="dark"] .zone--blue { background: #132230; border-color: #213547; }

.zone--ocre {
  background: linear-gradient(180deg, #FDFBF7 0%, #F8F3EA 100%);
  border: 1px solid #EBE1D0;
}
[data-theme="dark"] .zone--ocre { background: #26211B; border-color: #3D3429; }

/* --- En-tête de zone (Texte + Image) --- */
.zone__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.8rem;
}

.zone__text {
  flex: 1;
  padding-right: 1.2rem;
}

.zone__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary, #1E3D59);
  margin-bottom: 0.6rem;
}
.kicker-icon { font-size: 1.15rem; }
.zone__kicker--ocre { color: #A0722A; }

.zone__title {
  font-size: clamp(2.1rem, 1.7rem + 1.3vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 0.8rem 0;
  color: var(--primary, #1E3D59);
  font-weight: 800;
}
.zone--ocre .zone__title { color: #1E3D59; }
[data-theme="dark"] .zone--ocre .zone__title { color: #F2E8DC; }

.zone__desc {
  font-size: 1rem;
  color: #475569;
  line-height: 1.45;
  margin: 0;
}
[data-theme="dark"] .zone__desc { color: #94A3B8; }

/* Image d'illustration des étudiants */
.zone__img {
  width: 175px;
  height: 175px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #FFFFFF;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  flex-shrink: 0;
}

/* ═══════════ CARTES D'OFFRES (ZONE BLEUE) ═══════════ */
.offers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.offer-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.offer-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(30, 61, 89, 0.08);
}
[data-theme="dark"] .offer-card { background: #182635; border-color: #273A4F; }

.offer-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}
.offer-card__header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0;
  color: var(--primary, #1E3D59);
}

.badge {
  font-size: 1rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
}
.badge--blue { background: #E0EEFB; color: var(--primary, #1E3D59); }

.offer-card__subtitle {
  font-size: 1rem;
  font-weight: 700;
  color: #1E293B;
  margin: 0 0 0.8rem 0;
  line-height: 1.4;
}
[data-theme="dark"] .offer-card__subtitle { color: #F1F5F9; }

.offer-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  font-size: 1rem;
  flex-grow: 1;
}
.offer-features li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.45rem;
  color: #334155;
  line-height: 1.35;
}
[data-theme="dark"] .offer-features li { color: #CBD5E1; }
.offer-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #0284C7;
  font-weight: 800;
  font-size: 0.85rem;
}
.zone--ocre .offer-features li::before { color: #A0722A; }

.offer-card__note {
  font-size: 1rem;
  color: #64748B;
  margin: 0 0 0.8rem 0;
  border-top: 1px solid #F1F5F9;
  padding-top: 0.6rem;
  line-height: 1.4;
}
[data-theme="dark"] .offer-card__note { border-color: #263647; color: #94A3B8; }

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  width: 100%;
}
.btn--primary {
  background: var(--primary, #1E3D59);
  color: #FFFFFF;
}
.btn--primary:hover { filter: brightness(1.15); }

/* ═══════════ CARTES CERTIFICATIONS (ZONE OCRE) ═══════════ */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.cert-card {
  background: #FFFFFF;
  border: 1px solid #EBE1D0;
  border-radius: 12px;
  padding: 1rem 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
[data-theme="dark"] .cert-card { background: #231D17; border-color: #382F24; }

.cert-logo {
  height: 38px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin-bottom: 0.8rem;
}

.cert-card .offer-features {
  width: 100%;
  font-size: 1rem;
  margin-bottom: 0;
}
.cert-card .offer-features li {
  padding-left: 1.1rem;
  margin-bottom: 0.25rem;
}

/* Bannière WhatsApp */
.whatsapp-banner {
  background: #FDF4E7;
  border: 1px solid #EAD8BB;
  border-radius: 12px;
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
[data-theme="dark"] .whatsapp-banner { background: #2F271E; border-color: #4A3E31; }

.whatsapp-banner__content {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}
.whatsapp-banner__icon { font-size: 1.4rem; }
.whatsapp-banner__content p {
  margin: 0;
  font-size: 1rem;
  color: #2D3748;
  line-height: 1.45;
}
[data-theme="dark"] .whatsapp-banner__content p { color: #E2E8F0; }

.btn--whatsapp {
  background: #C49A4A;
  color: #1E3D59;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  width: 100%;
  font-size: 1rem;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
  transition: filter 0.18s ease;
}
.btn--whatsapp:hover { filter: brightness(0.92); }

/* ═══════════ ZONE NEUTRE (ACCÈS PAR CODE) ═══════════ */
.access-bar {
  background: #FFFFFF;
  border: 1px solid var(--border, #E2E8F0);
  border-radius: 14px;
  padding: 1.5rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
[data-theme="dark"] .access-bar { background: #16202B; border-color: #263545; }

.access-item {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  flex: 1;
}

.access-icon {
  width: 46px;
  height: 46px;
  background: #F1F5F9;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
[data-theme="dark"] .access-icon { background: #223040; }

.access-content { flex: 1; }
.access-content h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary, #1E3D59);
}
.access-content p {
  margin: 0 0 0.6rem 0;
  font-size: 1rem;
  color: var(--text-muted, #64748B);
}

.access-form {
  display: flex;
  gap: 0.6rem;
}
.access-form input {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.9rem;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
}
.access-form input:focus {
  outline: none;
  border-color: var(--accent, #C49A4A);
  box-shadow: 0 0 0 3px rgba(196, 154, 74, 0.15);
}
.access-form .btn { width: auto; white-space: nowrap; padding: 0.65rem 1.2rem; }

.btn--secondary {
  background: transparent;
  border: 1.5px solid var(--primary, #1E3D59);
  color: var(--primary, #1E3D59);
}
.btn--secondary:hover { background: var(--primary, #1E3D59); color: #FFFFFF; }

.access-divider {
  width: 1px;
  height: 70px;
  background: #E2E8F0;
}
[data-theme="dark"] .access-divider { background: #263545; }

/* ═══════════ MODALE WHATSAPP & IDENTIFICATION ═══════════ */
.modal {
  border: none;
  border-radius: 14px;
  padding: 0;
  background: var(--surface, #FFFFFF);
  box-shadow: 0 20px 30px rgba(0,0,0,0.15);
  max-width: 620px;
  width: 90%;
}
.modal::backdrop {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}
.modal-content { padding: 2.2rem; font-size: 1.15rem; }
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-weight: 700; margin-bottom: 0.4rem; font-size: 1.15rem; }
.form-group input { width: 100%; padding: 0.75rem; border: 1px solid #CBD5E1; border-radius: 8px; box-sizing: border-box; }
.form-control {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  background-color: var(--surface, #FFFFFF);
  color: var(--text-main, #334155);
  box-sizing: border-box;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent, #C49A4A);
  box-shadow: 0 0 0 3px rgba(196, 154, 74, 0.18);
}
.modal-divider {
  margin: 1.25rem 0;
  border: 0;
  border-top: 1px solid #E2E8F0;
}
[data-theme="dark"] .modal-divider { border-color: #263545; }
.required { color: #C49A4A; }
.phone-input-group { display: flex; gap: 0.5rem; }
.phone-input-group select { padding: 0.75rem; border: 1px solid #CBD5E1; border-radius: 8px; background: #FFFFFF; }
.phone-input-group input { flex-grow: 1; }
.modal-actions { display: flex; gap: 0.8rem; justify-content: flex-end; margin-top: 1.5rem; }
.modal-actions .btn { width: auto; }

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 1200px) {
  .offers-grid { grid-template-columns: 1fr; }
  .certs-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .app-header { flex-wrap: wrap; padding: 0.75rem 1rem; gap: 0.65rem; }
  .header__brand { max-width: calc(100% - 110px); }
  .marque-texte strong { font-size: 1rem; }
  .header__nav { order: 3; width: 100%; flex-wrap: wrap; gap: 0.75rem 1.1rem; justify-content: flex-start; border-top: 1px solid var(--border, #E2E8F0); padding-top: 0.5rem; }
  .portal-main { padding: 1rem; }
  .zone { padding: 1.25rem; }
  .portal-split { grid-template-columns: 1fr; }
  .zone__header { flex-direction: column; }
  .zone__text { padding-right: 0; }
  .zone__img { display: none; }
  .certs-grid { grid-template-columns: 1fr; }
  .access-bar { flex-direction: column; align-items: stretch; padding: 1.25rem; }
  .access-item { flex-direction: column; align-items: flex-start; }
  .access-divider { width: 100%; height: 1px; }
  .access-form { flex-direction: column; width: 100%; }
  .access-form .btn { width: 100%; white-space: normal; }
}

html[data-brand="none"] body > * {
  display: none !important;
}
