/* ================================================================
   TEAM DIAG — Feuille de styles principale
   Identité : Professionnel · Moderne · Confiance
   ================================================================ */

/* ── Variables ──────────────────────────────────────────────────── */
:root {
  --navy:       #0E2246;
  --navy-light: #1B3A6B;
  --blue:       #1D4ED8;
  --blue-light: #3B82F6;
  --teal:       #0EA5E9;
  --teal-light: #E0F2FE;
  --bg:         #F1F5F9;
  --bg-white:   #FFFFFF;
  --text:       #0F172A;
  --text-muted: #64748B;
  --border:     #E2E8F0;

  --green:  #10B981;
  --orange: #F59E0B;
  --red:    #EF4444;
  --gray:   #94A3B8;

  --radius:  10px;
  --radius-lg: 16px;
  --shadow:  0 2px 12px rgba(14,34,70,.08);
  --shadow-lg: 0 8px 40px rgba(14,34,70,.14);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ── Layout ─────────────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navbar ─────────────────────────────────────────────────────── */
.navbar {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.3px;
  text-decoration: none;
}
.logo svg { width: 36px; height: 36px; flex-shrink: 0; }
.logo strong { color: var(--teal); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  color: rgba(255,255,255,.75);
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s;
}
.nav-links a:hover { color: #fff; }

/* ── Boutons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .18s;
  text-decoration: none;
}
.btn-primary {
  background: var(--teal);
  color: #fff;
}
.btn-primary:hover { background: #0284c7; color: #fff; text-decoration: none; }
.btn-navy {
  background: var(--navy);
  color: #fff;
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--blue);
  color: var(--blue);
}
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: 12px; }

/* ── Hero ───────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 60%, #1e40af 100%);
  color: #fff;
  padding: 80px 0 90px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-badge {
  display: inline-block;
  background: rgba(14,165,233,.2);
  border: 1px solid rgba(14,165,233,.4);
  color: var(--teal);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -.5px;
}
.hero h1 span { color: var(--teal); }
.hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,.8);
  max-width: 560px;
  margin: 0 auto 36px;
}

/* ── Barre de recherche ─────────────────────────────────────────── */
.search-wrapper {
  max-width: 620px;
  margin: 0 auto;
  position: relative;
}
.search-bar {
  display: flex;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0,0,0,.3);
  overflow: hidden;
}
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  padding: 18px 20px;
  font-size: 1rem;
  font-family: var(--font);
  color: var(--text);
  background: transparent;
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar button {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 18px 28px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: background .2s;
  white-space: nowrap;
}
.search-bar button:hover { background: #1e40af; }
.search-hint {
  color: rgba(255,255,255,.5);
  font-size: .82rem;
  margin-top: 12px;
}

/* ── Résultats de recherche ─────────────────────────────────────── */
#search-results {
  max-width: 800px;
  margin: 32px auto 0;
  display: none;
}
.results-list { list-style: none; }
.result-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  border: 2px solid transparent;
}
.result-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-light);
}
.result-identity strong { font-size: 1rem; color: var(--navy); }
.result-identity span  { color: var(--text-muted); font-size: .88rem; display: block; margin-top: 2px; }
.result-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: .78rem;
  font-weight: 600;
}
.tag-domaine { background: #EFF6FF; color: var(--blue); }
.tag-actif   { background: #D1FAE5; color: #065F46; }
.tag-inactif { background: #FEE2E2; color: #991B1B; }
.tag-expiry  { background: #FEF3C7; color: #92400E; }

/* ── Loader ─────────────────────────────────────────────────────── */
.loader {
  display: none;
  justify-content: center;
  padding: 30px 0;
}
.loader-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--teal);
  margin: 0 4px;
  animation: bounce .8s infinite alternate;
}
.loader-dot:nth-child(2) { animation-delay: .15s; }
.loader-dot:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { from { transform: translateY(0); opacity: .5; } to { transform: translateY(-12px); opacity: 1; } }

/* ── Section stats hero ─────────────────────────────────────────── */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 48px;
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-item .num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--teal);
  line-height: 1;
}
.stat-item .lbl {
  font-size: .8rem;
  color: rgba(255,255,255,.6);
  margin-top: 4px;
}

/* ── Section "Comment ça marche" ────────────────────────────────── */
.section { padding: 72px 0; }
.section-label {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--teal);
  text-align: center;
  margin-bottom: 10px;
}
.section h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  text-align: center;
  color: var(--navy);
  margin-bottom: 48px;
  letter-spacing: -.3px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}
.step-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--teal);
}
.step-number {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--teal-light);
  color: var(--teal);
  font-size: 1.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.step-card h3 { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.step-card p  { font-size: .9rem; color: var(--text-muted); line-height: 1.6; }

/* ── Section features ───────────────────────────────────────────── */
.section-alt { background: var(--navy); }
.section-alt h2, .section-alt .section-label { color: rgba(255,255,255,.95); }
.section-alt .section-label { color: var(--teal); }
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.feature-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: background .2s;
}
.feature-card:hover { background: rgba(255,255,255,.1); }
.feature-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}
.feature-card h3 { font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 8px; }
.feature-card p  { font-size: .88rem; color: rgba(255,255,255,.6); line-height: 1.6; }
.feature-card .coming-soon {
  display: inline-block;
  background: rgba(14,165,233,.15);
  color: var(--teal);
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  margin-top: 10px;
  letter-spacing: .3px;
}

/* ── CTA Section ────────────────────────────────────────────────── */
.cta-section {
  text-align: center;
  padding: 72px 0;
  background: linear-gradient(135deg, #1D4ED8 0%, var(--teal) 100%);
  color: #fff;
}
.cta-section h2 { font-size: 2rem; font-weight: 800; margin-bottom: 12px; }
.cta-section p  { font-size: 1.1rem; opacity: .85; margin-bottom: 32px; }

/* ── Footer ─────────────────────────────────────────────────────── */
footer {
  background: #060E1F;
  color: rgba(255,255,255,.55);
  padding: 40px 0;
  font-size: .85rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
footer .logo { font-size: 1rem; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: rgba(255,255,255,.4); font-size: .82rem; }
.footer-links a:hover { color: #fff; }

/* ── Calendrier formations ──────────────────────────────────────── */
.fiche-header {
  background: var(--navy);
  color: #fff;
  padding: 36px 0 28px;
}
.fiche-identity h1 { font-size: 1.7rem; font-weight: 800; margin-bottom: 6px; }
.fiche-identity p  { color: rgba(255,255,255,.65); font-size: .95rem; }
.fiche-identity .badge-certifs {
  display: inline-block;
  background: rgba(14,165,233,.2);
  color: var(--teal);
  border: 1px solid rgba(14,165,233,.3);
  padding: 4px 14px;
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 600;
  margin-top: 10px;
}

.calendrier-section { padding: 40px 0; }
.calendrier-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 24px;
}

.calendrier-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.calendrier-table thead {
  background: var(--navy);
  color: #fff;
}
.calendrier-table th {
  padding: 14px 16px;
  text-align: center;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.calendrier-table th:first-child { text-align: left; min-width: 180px; }
.calendrier-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  text-align: center;
  font-size: .88rem;
}
.calendrier-table td:first-child { text-align: left; }
.calendrier-table tr:last-child td { border-bottom: none; }
.calendrier-table tr:hover td { background: #F8FAFC; }

.domaine-name { font-weight: 700; color: var(--navy); font-size: .95rem; }
.domaine-expiry { color: var(--text-muted); font-size: .78rem; margin-top: 3px; }

/* Cellules du calendrier */
.cal-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cal-label {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
}
.cal-sublabel { font-size: .7rem; color: var(--text-muted); }

.cal-fc-1          { background: #DBEAFE; color: #1E40AF; }
.cal-fc-2          { background: #FEF9C3; color: #854D0E; }
.cal-fc-mention    { background: #F3E8FF; color: #6B21A8; }
.cal-examen        { background: #FEE2E2; color: #991B1B; }
.cal-tutorat       { background: #D1FAE5; color: #065F46; }
.cal-vide          { color: var(--gray); font-size: 1.1rem; }
.cal-urgent        { animation: pulse-urgent 1.8s infinite; }
@keyframes pulse-urgent {
  0%, 100% { opacity: 1; }
  50% { opacity: .6; }
}

/* Année courante */
.col-current { background: #F0F9FF; }
th.col-current { background: #0284c7 !important; }

/* ── Statut alertes ─────────────────────────────────────────────── */
.alertes { margin-bottom: 32px; }
.alerte-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #fff;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--orange);
}
.alerte-card.urgent { border-left-color: var(--red); }
.alerte-card.ok     { border-left-color: var(--green); }
.alerte-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 1px; }
.alerte-text strong { font-size: .95rem; color: var(--navy); }
.alerte-text p      { font-size: .85rem; color: var(--text-muted); margin-top: 2px; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar .nav-links { gap: 16px; }
  .hero { padding: 52px 0 60px; }
  .hero h1 { font-size: 1.7rem; }
  .search-bar { flex-direction: column; border-radius: 12px; }
  .search-bar button { border-radius: 0 0 10px 10px; }
  .hero-stats { gap: 24px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .calendrier-table { font-size: .78rem; }
  .calendrier-table th, .calendrier-table td { padding: 10px 8px; }
}
