/* ══════════════════════════════════════════
   verifier-resultat.css  — EducMaster / MEMP
   Charte graphique — conforme maquette
   ══════════════════════════════════════════ */

:root {
  /* Couleurs MEMP */
  --brand:        #1a2e5e;
  --brand-mid:    #1e3a7a;
  --brand-dark:   #111e40;
  --brand-light:  #e8edf8;
  --brand-xlight: #f0f4fb;

  /* Hero bleu clair (maquette) */
  --hero-bg:      #dce6fb;

  /* États */
  --success:      #1a7f37;
  --success-bg:   #e6f4ea;
  --success-bd:   #a8d5b5;
  --error:        #c62828;
  --error-bg:     #fdecea;
  --error-bd:     #ef9a9a;

  /* Neutres */
  --text:         #111827;
  --text-muted:   #6b7a99;
  --border:       #d8e0f0;
  --bg:           #ffffff;
  --page-bg:      #ffffff;
  --white:        #ffffff;

  /* Misc */
  --radius:       8px;
  --radius-lg:    14px;
  --shadow-sm:    0 1px 4px rgba(26,46,94,.08);
  --shadow-md:    0 6px 28px rgba(26,46,94,.10);
  --font:         'Inter', Arial, sans-serif;
  --transition:   .2s cubic-bezier(.4,0,.2,1);
}

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

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

/* ══ NAVBAR ══════════════════════════════════════════════ */
.navbar {
  background: var(--white);
  height: 68px;
  display: flex;
  align-items: center;
  padding: 0 5%;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid #eef1f7;
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

.navbar-logo img { height: 46px; width: auto; }

.navbar-links {
  display: flex;
  list-style: none;
  gap: 6px;
  align-items: center;
}

.navbar-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}
.navbar-links a:hover { color: var(--brand); background: var(--brand-light); }
.navbar-links a.active {
  color: var(--brand);
  font-weight: 700;
}
.navbar-links .nav-link-portail { color: var(--text); font-weight: 500; }
.navbar-links .nav-cta {
  background: var(--brand);
  color: var(--white) !important;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 6px;
  margin-left: 4px;
}
.navbar-links .nav-cta:hover { background: var(--brand-dark) !important; }

/* Hamburger */
.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.hamburger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}

/* ══ HERO (bleu clair) ════════════════════════════════════ */
.hero {
  background: var(--hero-bg);
  position: relative;
  overflow: hidden;
  padding: 60px 5% 72px;
}
.hero-content {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  color: var(--brand);
}
.hero-title {
  font-size: clamp(30px, 5vw, 50px);
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 18px;
  letter-spacing: -.5px;
  color: var(--brand-dark);
}
.hero-title-accent { color: var(--brand-mid); font-style: italic; }

.hero-subtitle {
  font-size: 16px;
  color: var(--brand);
  opacity: .85;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
  font-weight: 500;
}

/* ══ LAYOUT ═══════════════════════════════════════════════ */
.layout-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  max-width: 940px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

/* ══ SEARCH CARD (chevauche le hero) ══════════════════════ */
.search-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 30px 34px;
  box-shadow: var(--shadow-md);
  border: 1px solid #eef1f7;
  width: 100%;
  margin-top: -44px;
  position: relative;
  z-index: 5;
}

.search-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.search-card-icon {
  width: 56px; height: 56px;
  background: var(--brand-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--brand);
}
.search-card-icon svg { width: 24px; height: 24px; }
.search-card-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--brand-dark);
  margin-bottom: 4px;
}
.search-card-sub { font-size: 13.5px; color: var(--text-muted); }

.search-card-controls {
  display: flex;
  gap: 14px;
  align-items: stretch;
  flex-wrap: wrap;
}

/* ── RADIO CARDS (pilules) ── */
.result-left-radio { display: flex; gap: 12px; align-items: center; }

.radio-card {
  height: 48px;
  padding: 0 18px;
  background: var(--white);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  cursor: pointer;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  user-select: none;
  white-space: nowrap;
  transition: all var(--transition);
}
.radio-card:hover { border-color: var(--brand); color: var(--brand); }
.radio-card.active {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--white);
  font-weight: 600;
}
.radio-circle {
  width: 16px; height: 16px;
  border: 2px solid currentColor;
  border-radius: 50%;
  margin-right: 9px;
  flex-shrink: 0;
  transition: var(--transition);
}
.radio-card.active .radio-circle {
  background: var(--white);
  box-shadow: inset 0 0 0 3px var(--brand);
}

/* ── BARRE DE RECHERCHE ── */
.result-left-search { display: flex; gap: 12px; flex: 1; min-width: 280px; }
.search-input-wrapper { position: relative; flex: 1; }

.search-input {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 42px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  outline: none;
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(26,46,94,.10);
}
.search-input.input-error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(198,40,40,.12);
}

.search-icon-svg {
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  width: 17px; height: 17px;
  color: #a0aabb;
  pointer-events: none;
}

.verify-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 22px;
  height: 48px;
  background: var(--brand);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .3px;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.verify-btn:hover:not(:disabled) {
  background: var(--brand-dark);
  transform: translateY(-1px);
}
.verify-btn:active:not(:disabled) { transform: translateY(0); }
.verify-btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-arrow { width: 15px; height: 15px; }

/* ══ ALERTE (bleu clair, sous la carte) ═══════════════════ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 15px 18px;
  background: var(--hero-bg);
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--brand-dark);
  line-height: 1.6;
}
.alert-svg {
  width: 19px; height: 19px;
  flex-shrink: 0; margin-top: 1px;
  stroke: var(--brand);
}
.alert strong { color: var(--brand-dark); }

/* ══ RÉSULTAT ═════════════════════════════════════════════ */
#result-display {
  display: none;
  width: 100%;
  animation: slideUp .3s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
#result-display.state-error {
  background: var(--error-bg);
  border: 1px solid var(--error-bd);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--error);
  font-size: 13px;
  font-weight: 600;
}

/* ── EN-TÊTE "Informations du candidat" ── */
.fiche-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.fiche-topbar-left { display: flex; align-items: center; gap: 16px; }
.fiche-check {
  width: 52px; height: 52px;
  background: var(--success);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  flex-shrink: 0;
}
.fiche-check svg { width: 26px; height: 26px; }
.fiche-topbar h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--brand-dark);
  margin-bottom: 2px;
}
.fiche-topbar-sub { font-size: 13px; color: var(--text-muted); max-width: 520px; }
.fiche-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand);
  background: var(--white);
  white-space: nowrap;
}
.fiche-badge svg { width: 15px; height: 15px; }

/* ── CARTE PRINCIPALE ── */
.fiche-card {
  background: var(--white);
  border: 1px solid #e6eaf3;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* Bloc de section avec titre + icône */
.fiche-section {
  padding: 24px 28px;
}
.fiche-section + .fiche-section { border-top: 1px solid #eef1f7; }
.fiche-section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.fiche-section-ico {
  width: 38px; height: 38px;
  background: var(--brand-light);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand);
  flex-shrink: 0;
}
.fiche-section-ico svg { width: 18px; height: 18px; }
.fiche-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-dark);
}

/* Grille deux colonnes (Identité) */
.fiche-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 40px;
}
.info-item label {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 4px;
  font-weight: 500;
}
.info-item span {
  font-weight: 600;
  color: var(--text);
  font-size: 14.5px;
  word-break: break-word;
}
.info-item span.highlight {
  color: var(--brand-mid);
  font-size: 15px;
  font-weight: 700;
}

/* Section double : Examen + Établissement côte à côte */
.fiche-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.fiche-split > .fiche-section { border-top: 1px solid #eef1f7; }
.fiche-split > .fiche-section + .fiche-section { border-left: 1px solid #eef1f7; }

/* Lignes localisation (école / centre) */
.fiche-loc-row { display: flex; align-items: flex-start; gap: 10px; }
.fiche-loc-row + .fiche-loc-row { margin-top: 16px; }
.fiche-loc-pin {
  color: var(--brand-mid);
  flex-shrink: 0;
  margin-top: 2px;
}
.fiche-loc-pin svg { width: 16px; height: 16px; }
.fiche-loc-text .lbl {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 3px;
  font-weight: 500;
}
.fiche-loc-text strong {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.fiche-loc-text small { font-size: 12px; color: var(--text-muted); }

/* Stack vertical d'infos (colonne examen) */
.fiche-stack .info-item + .info-item { margin-top: 16px; }

/* ── BLOC TÉLÉCHARGEMENT (vert) ── */
.fiche-download {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 22px 26px;
  background: var(--success-bg);
  border: 1px solid var(--success-bd);
  border-radius: var(--radius-lg);
}
.fiche-download-left { display: flex; align-items: center; gap: 18px; }
.fiche-download-pdf {
  width: 56px; height: 64px;
  flex-shrink: 0;
  color: var(--success);
}
.fiche-download-pdf svg { width: 100%; height: 100%; }
.fiche-download-text h4 {
  font-size: 19px;
  font-weight: 800;
  color: var(--brand-dark);
  margin-bottom: 4px;
}
.fiche-download-text p { font-size: 13px; color: #45614f; line-height: 1.5; }

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 24px;
  height: 48px;
  background: var(--success);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition), transform var(--transition);
}
.btn-download:hover { background: #156a2d; transform: translateY(-1px); }
.btn-download:active { transform: translateY(0); }
.btn-download svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-download.loading { opacity: .8; cursor: wait; pointer-events: none; }
.btn-download.loading .dl-icon { display: none; }
.btn-download .dl-spinner { display: none; }
.btn-download.loading .dl-spinner { display: block; }

@keyframes spin { to { transform: rotate(360deg); } }
.spin-svg { animation: spin .8s linear infinite; }

/* ══ FOOTER ═══════════════════════════════════════════════ */
.site-footer {
  background: #e9ecf2;
  color: var(--text-muted);
  padding: 26px 5%;
  text-align: center;
  font-size: 13px;
}
.site-footer-inner { max-width: 1280px; margin: 0 auto; }
.site-footer strong { color: var(--text); }
.site-footer a { color: var(--brand-mid); text-decoration: underline; }

/* ══════════════════════════════════════════
   RESPONSIVE — TABLETTE (≤ 1024px)
   ══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .navbar-links a { font-size: 12.5px; padding: 6px 9px; }
}

/* ══════════════════════════════════════════
   RESPONSIVE — MOBILE (≤ 768px)
   ══════════════════════════════════════════ */
@media (max-width: 768px) {
  .navbar { height: 58px; padding: 0 16px; }
  .navbar-logo img { height: 36px; }

  .navbar-toggle { display: flex; }

  .navbar-links {
    display: none;
    position: absolute;
    top: 58px; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    z-index: 999;
    padding: 8px 0 12px;
    border-bottom: 3px solid var(--brand);
  }
  .navbar-links.open { display: flex; }
  .navbar-links li { width: 100%; }
  .navbar-links a {
    display: block;
    padding: 12px 20px;
    border-radius: 0;
    font-size: 13.5px;
    border-bottom: 1px solid #f0f3fa;
  }
  .navbar-links a.active {
    background: var(--brand-light);
    border-left: 3px solid var(--brand);
    padding-left: 17px;
  }
  .navbar-links .nav-cta {
    margin: 8px 16px 0;
    border-radius: 6px;
    text-align: center;
  }

  .hero { padding: 40px 20px 56px; }
  .hero-title { font-size: 28px; }
  .hero-subtitle { font-size: 14px; }

  .layout-container { padding: 0 16px 44px; gap: 18px; }
  .search-card { padding: 22px 18px; margin-top: -36px; }
  .search-card-title { font-size: 19px; }
  .search-card-icon { width: 48px; height: 48px; }

  .search-card-controls { flex-direction: column; }
  .result-left-radio { flex-direction: column; align-items: stretch; }
  .radio-card { justify-content: flex-start; }
  .result-left-search { flex-direction: column; min-width: 0; }
  .verify-btn { width: 100%; justify-content: center; }

  .fiche-topbar h3 { font-size: 19px; }
  .fiche-section { padding: 20px 18px; }
  .fiche-grid { grid-template-columns: 1fr; gap: 14px; }
  .fiche-split { grid-template-columns: 1fr; }
  .fiche-split > .fiche-section + .fiche-section { border-left: none; border-top: 1px solid #eef1f7; }

  .fiche-download { padding: 18px; }
  .fiche-download-left { gap: 14px; }
  .fiche-download-text h4 { font-size: 17px; }
  .btn-download { width: 100%; justify-content: center; }
}

@media (max-width: 380px) {
  .hero-title { font-size: 24px; }
  .search-input { font-size: 14px; }
}
