/* ============================================================
   VARIABLES GLOBALES
   ============================================================ */
@property --p {
  syntax: '<number>';
  inherits: true;
  initial-value: 0;
}

:root {
  --navy:        #0b2545;
  --navy-light:  #13315c;
  --navy-soft:   #1d4e89;
  --gold:        #f4a261;
  --gold-light:  #ffd166;
  --bg:          #f4f7fb;
  --card:        #ffffff;
  --text:        #1b2a41;
  --muted:       #64748b;
  --border:      #e3e9f2;
  --shadow:      0 10px 30px rgba(11, 37, 69, .08);
  --shadow-lg:   0 18px 45px rgba(11, 37, 69, .16);
  --radius:      18px;
}

/* ============================================================
   RESET / BASE
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ============================================================
   SECTION 1 — EN-TÊTE (logo + nom + bouton connexion)
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 55%, var(--navy-soft) 100%);
  color: #fff;
  padding: 34px 24px 78px;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.hero::before {
  width: 480px; height: 480px;
  top: -220px; right: -140px;
  background: radial-gradient(circle, rgba(244,162,97,.30), transparent 68%);
}
.hero::after {
  width: 420px; height: 420px;
  bottom: -240px; left: -160px;
  background: radial-gradient(circle, rgba(255,209,102,.18), transparent 68%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  flex-wrap: wrap;
}

/* Groupe gauche : logo + nom */
.hero-brand {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}

/* --- Logo --- */
.logo {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .28));
  animation: pop .7s cubic-bezier(.2, .9, .3, 1.4) both;
}

.logo svg { width: 100%; height: 100%; }

/* --- Bloc texte --- */
.school-name {
  font-size: clamp(1.7rem, 4.5vw, 2.9rem);
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1.15;
  text-transform: uppercase;
}

.school-name .accent {
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  margin-top: 8px;
  font-size: clamp(.85rem, 2vw, 1rem);
  color: rgba(255, 255, 255, .78);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 500;
}

.tagline span { color: var(--gold-light); }

.rule {
  width: 90px;
  height: 4px;
  margin-top: 16px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

/* --- Bouton Se connecter --- */
.btn-login {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--navy);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 10px 24px rgba(244, 162, 97, .40);
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
  white-space: nowrap;
}

.btn-login svg {
  width: 18px;
  height: 18px;
  stroke: var(--navy);
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-login:hover {
  transform: translateY(-3px);
  filter: brightness(1.06);
  box-shadow: 0 16px 32px rgba(244, 162, 97, .55);
}

.btn-login:active { transform: translateY(-1px); }

.btn-login:focus-visible {
  outline: 3px solid rgba(255, 209, 102, .7);
  outline-offset: 3px;
}

/* ============================================================
   STRUCTURE GÉNÉRALE DES SECTIONS
   ============================================================ */
main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

section { margin-top: 54px; }

.section-head {
  text-align: center;
  margin-bottom: 34px;
}

.section-head h2 {
  font-size: clamp(1.35rem, 3.2vw, 1.9rem);
  color: var(--navy);
  font-weight: 800;
  letter-spacing: .5px;
}

.section-head p {
  color: var(--muted);
  font-size: .95rem;
  margin-top: 6px;
}

.section-head .underline {
  width: 64px;
  height: 4px;
  margin: 14px auto 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

/* ============================================================
   SECTION 2 — RÉSULTATS
   ============================================================ */
.results-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 42px 26px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 34px 20px;
  justify-items: center;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 190px;
  padding: 14px 8px;
  border-radius: 14px;
  transition: transform .28s ease, background .28s ease;
}

.stat:hover {
  transform: translateY(-6px);
  background: #f8fafd;
}

.ring {
  --p: 0;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: conic-gradient(
    var(--color) calc(var(--p) * 1%),
    #e8ecf4 0
  );
  animation: fill 1.6s cubic-bezier(.22, .9, .3, 1) both;
}

.ring::before {
  content: "";
  position: absolute;
  inset: 11px;
  background: var(--card);
  border-radius: 50%;
  box-shadow: inset 0 2px 8px rgba(11, 37, 69, .07);
}

.ring .value {
  position: relative;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -.5px;
}

.ring .value small {
  font-size: .95rem;
  font-weight: 700;
  color: var(--muted);
}

.stat-label {
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy-light);
  letter-spacing: .5px;
  text-align: center;
}

.results-note {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px dashed var(--border);
  text-align: center;
  font-size: .86rem;
  color: var(--muted);
  font-style: italic;
}

/* ============================================================
   SECTION 3 — CONTACT
   ============================================================ */
.contact-card {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 44px 28px;
  position: relative;
  overflow: hidden;
}

.contact-card::after {
  content: "";
  position: absolute;
  width: 340px; height: 340px;
  top: -160px; right: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244,162,97,.22), transparent 70%);
  pointer-events: none;
}

.contact-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  text-decoration: none;
  color: #fff;
  transition: background .25s ease, transform .25s ease, border-color .25s ease;
}

.contact-item:hover {
  background: rgba(255, 255, 255, .13);
  border-color: rgba(244, 162, 97, .55);
  transform: translateY(-4px);
}

.contact-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  box-shadow: 0 6px 16px rgba(244, 162, 97, .35);
}

.contact-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--navy);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-text { min-width: 0; }

.contact-text .label {
  display: block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--gold-light);
  font-weight: 700;
  margin-bottom: 3px;
}

.contact-text .value {
  display: block;
  font-size: .98rem;
  font-weight: 600;
  word-break: break-word;
  color: rgba(255, 255, 255, .95);
}

/* ============================================================
   PIED DE PAGE
   ============================================================ */
footer {
  text-align: center;
  padding: 26px 20px 34px;
  font-size: .82rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: #fff;
}

footer strong { color: var(--navy); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fill {
  from { --p: 0; }
}

@keyframes pop {
  from { opacity: 0; transform: scale(.75) rotate(-8deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-inner    { animation: fadeUp .7s ease both; }
.results-card  { animation: fadeUp .7s .15s ease both; }
.contact-card  { animation: fadeUp .7s .3s ease both; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 720px) {
  .hero-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero-brand {
    flex-direction: column;
    text-align: center;
    gap: 18px;
  }

  .rule { margin-left: auto; margin-right: auto; }

  .btn-login {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .hero { padding: 26px 20px 62px; }

  .logo { width: 78px; height: 78px; }

  .results-card { padding: 30px 16px; }

  .ring { width: 110px; height: 110px; }
  .ring .value { font-size: 1.45rem; }

  .contact-card { padding: 30px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
/* ============================================================
   PAGE DE CONNEXION — /se_connecter
   ============================================================ */

/* --- Conteneur général (fond dégradé comme l'en-tête) --- */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 55%, var(--navy-soft) 100%);
  position: relative;
  overflow: hidden;
}

/* Halos décoratifs */
.login-wrapper::before,
.login-wrapper::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.login-wrapper::before {
  width: 480px; height: 480px;
  top: -220px; right: -140px;
  background: radial-gradient(circle, rgba(244,162,97,.30), transparent 68%);
}
.login-wrapper::after {
  width: 420px; height: 420px;
  bottom: -240px; left: -160px;
  background: radial-gradient(circle, rgba(255,209,102,.18), transparent 68%);
}

/* --- Carte blanche centrale --- */
.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 42px 34px 38px;
  animation: fadeUp .7s ease both;
}

/* --- En-tête de la carte --- */
.login-head {
  text-align: center;
  margin-bottom: 30px;
}

.login-title {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: .5px;
  text-transform: uppercase;
}

.login-sub {
  font-size: .9rem;
  color: var(--muted);
  margin-top: 6px;
}

.login-underline {
  width: 64px;
  height: 4px;
  margin: 14px auto 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

/* --- Structure des champs --- */
.ligne_formulaire {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.ligne_formulaire .haut {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--navy-light);
}

.ligne_formulaire .bas,
.ligne_formulaire input,
.ligne_formulaire select {
  width: 100%;
  padding: 13px 16px;
  font-size: .98rem;
  font-family: inherit;
  color: var(--text);
  background: #f8fafd;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  transition: border-color .22s ease, box-shadow .22s ease, background .22s ease;
  outline: none;
}

.ligne_formulaire input::placeholder {
  color: #a3b1c6;
}

.ligne_formulaire input:focus,
.ligne_formulaire select:focus {
  border-color: var(--gold);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(244, 162, 97, .18);
}

/* --- Groupe indicatif + téléphone --- */
.tel-group {
  display: flex;
  gap: 10px;
}

.tel-group .indicatif {
  flex: 0 0 auto;
  width: auto;
  min-width: 110px;
  padding-right: 10px;
  cursor: pointer;
}

.tel-group .tel {
  flex: 1;
}

/* --- Bouton Se connecter (réutilise .btn-login) --- */
.btn-login-full {
  width: 100%;
  justify-content: center;
  margin-top: 6px;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

/* --- Responsive --- */
@media (max-width: 480px) {
  .login-card {
    padding: 32px 22px 28px;
  }

  .tel-group {
    flex-direction: column;
  }

  .tel-group .indicatif {
    width: 100%;
  }
}