/* =========================================================
   Skyrider Academy — Espace stagiaire
   Charte graphique : bleu profond, turquoise, accents
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --navy-deep: #0D1B3D;
  --navy-darker: #0A1530;
  --heading-blue: #1E3A8A;
  --cta-blue: #5B7CE8;
  --cta-blue-hover: #7390EF;
  --turquoise: #4FD4B8;
  --turquoise-soft: rgba(79, 212, 184, 0.12);
  --orange: #F5A050;
  --grey-light: #E2E8F0;
  --grey-mid: #94A3B8;
  --grey-soft: #475569;
  --text-light: #F1F5F9;
  --text-muted: rgba(255, 255, 255, 0.65);
  --error: #EF4444;
  --success: #10B981;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy-darker) 100%);
  background-attachment: fixed;
  color: var(--text-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ================== TOPBAR (langue + compte) ================== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}
.topbar-monogram {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.topbar-monogram img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.topbar-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: #fff;
}
.topbar-name small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.30em;
  color: var(--turquoise);
  font-weight: 500;
  margin-top: -2px;
}

.topbar-right {
  display: flex; align-items: center; gap: 22px;
}
.lang-switch {
  display: flex; gap: 6px;
  font-size: 13px;
  font-weight: 600;
}
.lang-switch a {
  color: var(--grey-mid);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}
.lang-switch a.active {
  color: var(--turquoise);
}
.lang-switch a:hover {
  color: #fff;
}
.lang-switch span { color: rgba(255,255,255,0.2); }

.topbar-account {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  font-size: 13px;
}
.topbar-account-name { color: #fff; font-weight: 500; }
.topbar-account-logout {
  color: var(--grey-mid);
  text-decoration: none;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.10);
  transition: color 0.2s;
}
.topbar-account-logout:hover { color: var(--orange); }

/* ================== LOGIN CARD ================== */
.login-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.login-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px;
  padding: 44px 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.login-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--turquoise);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 8px;
}
.login-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 30px;
  font-weight: 600;
  text-align: center;
  color: #fff;
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.login-sub {
  text-align: center;
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.55;
}

.field {
  margin-bottom: 18px;
}
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--grey-mid);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-bottom: 8px;
}
.field-input {
  width: 100%;
  padding: 13px 16px;
  font-size: 15px;
  font-family: inherit;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  transition: border-color 0.2s, background 0.2s;
}
.field-input:focus {
  outline: none;
  border-color: var(--cta-blue);
  background: rgba(255, 255, 255, 0.08);
}
.field-input::placeholder { color: rgba(255, 255, 255, 0.30); }

.btn-primary {
  display: block;
  width: 100%;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(135deg, var(--cta-blue) 0%, var(--heading-blue) 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  letter-spacing: 0.02em;
  margin-top: 8px;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(91, 124, 232, 0.35);
}
.btn-primary:active { transform: translateY(0); }

.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #FCA5A5;
}
.alert-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6EE7B7;
}
.alert-info {
  background: rgba(91, 124, 232, 0.10);
  border: 1px solid rgba(91, 124, 232, 0.30);
  color: #BFDBFE;
}

.help-row {
  margin-top: 22px;
  text-align: center;
  font-size: 13px;
  color: var(--grey-mid);
}
.help-row a {
  color: var(--turquoise);
  text-decoration: none;
  font-weight: 500;
}
.help-row a:hover { text-decoration: underline; }

/* ================== DASHBOARD ================== */
.dashboard-wrap {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 50px 24px 80px;
}
.dashboard-hello {
  margin-bottom: 40px;
}
.dashboard-hello .eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--turquoise);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.dashboard-hello h1 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 38px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.01em;
  margin-bottom: 10px;
}
.dashboard-hello p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 720px;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 22px;
  margin-top: 30px;
}
.course-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  padding: 28px 26px 24px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}
.course-card.unlocked:hover {
  transform: translateY(-3px);
  border-color: var(--turquoise);
  background: rgba(255, 255, 255, 0.06);
}
.course-card.locked {
  opacity: 0.55;
  filter: grayscale(0.3);
}
.course-card-status {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 12px;
}
.course-card.unlocked .course-card-status {
  color: var(--turquoise);
  background: var(--turquoise-soft);
}
.course-card.locked .course-card-status {
  color: var(--grey-mid);
  background: rgba(148, 163, 184, 0.10);
}
.course-card h3 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}
.course-card p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 22px;
  flex-grow: 1;
}
.course-card-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  align-self: flex-start;
  transition: all 0.2s;
}
.course-card.unlocked .course-card-action {
  color: #fff;
  background: var(--cta-blue);
}
.course-card.unlocked .course-card-action:hover {
  background: var(--cta-blue-hover);
  transform: translateX(3px);
}
.course-card.locked .course-card-action {
  color: var(--grey-mid);
  background: rgba(148, 163, 184, 0.08);
  cursor: not-allowed;
}

/* ================== FOOTER ================== */
.footer {
  text-align: center;
  padding: 24px 20px;
  font-size: 12px;
  color: var(--grey-mid);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.footer a { color: var(--grey-mid); text-decoration: none; margin: 0 6px; }
.footer a:hover { color: var(--turquoise); }

/* ================== RESPONSIVE ================== */
@media (max-width: 600px) {
  .topbar { padding: 14px 18px; }
  .topbar-name { font-size: 14px; letter-spacing: 0.14em; }
  .topbar-account { padding: 6px 10px; font-size: 12px; }
  .login-card { padding: 32px 24px 28px; }
  .login-title { font-size: 24px; }
  .dashboard-wrap { padding: 30px 16px 60px; }
  .dashboard-hello h1 { font-size: 28px; }
}


/* ================== TITRES COURS — IDENTITÉS CHROMATIQUES ================== */
/* Chaque formation a sa propre identité couleur qui correspond à sa progression :
   A1/A3 = turquoise (entrée), A2 = bleu (intermédiaire), STS Pro = orange (expertise) */

.course-card[data-course="a1a3"] h3 {
  background: linear-gradient(135deg, #4FD4B8 0%, #7BE0CC 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.course-card[data-course="a2"] h3 {
  background: linear-gradient(135deg, #5B7CE8 0%, #8FA8F2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.course-card[data-course="sts"] h3 {
  background: linear-gradient(135deg, #F5A050 0%, #F8C078 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Badge PRO pour la formation STS */
.course-card-pro-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: linear-gradient(135deg, #F5A050 0%, #F8C078 100%);
  color: #1A0F30 !important;
  -webkit-text-fill-color: #1A0F30 !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  border-radius: 4px;
  vertical-align: middle;
  position: relative;
  top: -2px;
}

/* Underline coloré subtil au hover de chaque card */
.course-card.unlocked {
  position: relative;
  overflow: hidden;
}
.course-card.unlocked::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}
.course-card[data-course="a1a3"].unlocked::before {
  background: linear-gradient(90deg, #4FD4B8 0%, #7BE0CC 100%);
}
.course-card[data-course="a2"].unlocked::before {
  background: linear-gradient(90deg, #5B7CE8 0%, #8FA8F2 100%);
}
.course-card[data-course="sts"].unlocked::before {
  background: linear-gradient(90deg, #F5A050 0%, #F8C078 100%);
}
.course-card.unlocked:hover::before {
  transform: scaleX(1);
}

/* ================== INSCRIPTION & ACTIVATION ================== */
.login-card-large {
  max-width: 520px;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.radio-pill {
  flex: 1;
  min-width: 110px;
  position: relative;
  padding: 14px 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
  font-size: 14px;
  color: var(--text-light);
  user-select: none;
}
.radio-pill:hover {
  border-color: rgba(79, 212, 184, 0.40);
  background: rgba(79, 212, 184, 0.04);
}
.radio-pill input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.radio-pill.selected {
  border-color: var(--turquoise);
  background: rgba(79, 212, 184, 0.10);
  color: var(--turquoise);
  font-weight: 600;
}
.radio-pill.selected::after {
  content: '✓';
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--turquoise);
}

.rgpd-field {
  margin-top: 8px;
}
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  transition: all 0.2s;
}
.checkbox-row:hover {
  border-color: rgba(79, 212, 184, 0.30);
  background: rgba(79, 212, 184, 0.04);
}
.checkbox-row input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--turquoise);
  width: 16px;
  height: 16px;
}
.checkbox-row span {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
}

.alert-success {
  background: rgba(79, 212, 184, 0.10);
  border: 1px solid rgba(79, 212, 184, 0.40);
  color: var(--turquoise);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
}
.alert-success > span:first-child {
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}
.alert-success strong {
  color: var(--turquoise);
  font-size: 15px;
  display: block;
}
.alert-success p {
  color: var(--text-light);
  font-size: 13.5px;
}


/* ================== BOUTONS TOPBAR ACADEMY + INSPECTION ================== */
/* Cohérent avec les boutons de la page publique academy.html */

.topbar-academy-link {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 6px;
  background: var(--turquoise);
  color: var(--navy-deep);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  transition: transform 0.2s;
  white-space: nowrap;
}
.topbar-academy-link:hover {
  transform: translateY(-1px);
}

.topbar-skyrider-link {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 6px;
  background: #5B7CE8;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.topbar-skyrider-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(91, 124, 232, 0.4);
}

@media (max-width: 768px) {
  .topbar-academy-link,
  .topbar-skyrider-link {
    padding: 8px 14px;
    font-size: 12px;
  }
}

@media (max-width: 500px) {
  .topbar-academy-link,
  .topbar-skyrider-link {
    padding: 7px 11px;
    font-size: 11px;
    letter-spacing: 0;
  }
}
