/* ─── Variables ───────────────────────────────────────────────────────────── */
:root {
  --sidebar-w: 290px;

  --navy: #1E3A5F;
  --navy-dark: #152B47;
  --amber: #D97706;
  --gold: #D97706;
  --dark: #152B47;
  --bg: #F8FAFC;
  --white: #FFFFFF;
  --muted: #64748B;
  --border: #E2E8F0;
  --text: #1E293B;

  --green: #059669;
  --red: #DC2626;

  --shadow-sm: 0 2px 8px rgba(21,43,71,.08);
  --shadow-md: 0 8px 28px rgba(21,43,71,.12);
  --shadow-lg: 0 16px 48px rgba(21,43,71,.16);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

/* ─── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* ─── Layout ──────────────────────────────────────────────────────────────── */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--navy);
  color: var(--white);
  padding: 0 20px 28px;   /* 0 en haut pour que le logo colle au bord */
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  z-index: 10;
}



/* ─── Brand / Logo ────────────────────────────────────────────────────────── */
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 0;
  margin-left: -20px;    /* compense le padding de la sidebar */
  margin-right: -20px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.brand-logo {
  width: 100%;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: hidden;
  background: none;
  border-radius: 0;
  box-shadow: none;
}

.brand-logo img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.brand-logo-fallback {
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: 28px;
  color: var(--dark);
  letter-spacing: -1px;
}

.brand-name {
  font-family: 'Raleway', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.3;
}

.brand-sub {
  font-size: 12px;
  color: rgba(255,255,255,.5);
  letter-spacing: .04em;
  margin-top: 2px;
}
/* ─── forms─────────────────────────────────────────────────────────────────── */
.aide-intro {
  background: var(--bg-card, #fff);
  border-left: 4px solid var(--accent, #E87722);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 24px;
  color: var(--text-secondary, #555);
  line-height: 1.6;
}

.forms-container {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* ─── Nav ─────────────────────────────────────────────────────────────────── */
.menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.menu-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  padding: 0 10px;
  margin: 14px 0 6px;
}

.menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,.72);
  text-decoration: none;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 400;
  transition: background .18s, color .18s, transform .18s;
  position: relative;
}

.menu-link .icon {
  width: 22px;
  font-size: 16px;
  text-align: center;
  flex-shrink: 0;
}

.menu-link:hover,
.menu-link.active {
  background: rgba(255,255,255,.09);
  color: var(--white);
  transform: translateX(3px);
}

.menu-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--gold);
  border-radius: 0 3px 3px 0;
}

/* ─── Sidebar footer ──────────────────────────────────────────────────────── */
.sidebar-footer {
  margin-top: 24px;
  padding: 16px;
  background: rgba(255,255,255,.06);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.08);
}

.sidebar-footer p {
  font-size: 12px;
  color: rgba(255,255,255,.5);
  line-height: 1.5;
}

.sidebar-footer span {
  color: var(--gold);
  font-weight: 600;
}

/* ─── Main content ────────────────────────────────────────────────────────── */
.main-content {
  flex: 1;
  padding: 36px 40px;
  max-width: calc(100vw - var(--sidebar-w));
  animation: fadeUp .5s ease both;
}

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

/* ─── Topbar ──────────────────────────────────────────────────────────────── */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 32px;
  animation: fadeUp .5s .05s ease both;
  opacity: 0;
}

.topbar-left .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--gold);
  margin-bottom: 10px;
}

.topbar-left .eyebrow::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.topbar-left h2 {
  font-family: 'Raleway', sans-serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--dark);
  margin-bottom: 10px;
  max-width: 580px;
}

.topbar-left h2 span {
  color: var(--navy);
}

.intro {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
  max-width: 540px;
}

.topbar-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.user-info {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-align: right;
}

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform .18s, box-shadow .18s;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(63,85,120);
}

.btn-primary:hover {
  box-shadow: 0 8px 24px rgba(63,85,120);
}

.btn-light {
  background: var(--gold);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* ─── Hero Banner ─────────────────────────────────────────────────────────── */
.hero {
  margin-bottom: 36px;
  animation: fadeUp .5s .10s ease both;
  opacity: 0;
}

.hero-card {
  background: var(--gold);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  color: var(--white);
  box-shadow: var(--shadow-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  overflow: hidden;
  position: relative;
}



.hero-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gold);
  margin-bottom: 12px;
  background: rgba(245,156,40,.15);
  padding: 4px 12px;
  border-radius: 20px;
}

.hero-card h3 {
  font-family: 'Raleway', sans-serif;
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.2;
}

.hero-card p {
  font-size: 14.5px;
  line-height: 1.7;
  color: rgba(255,255,255,.78);
  max-width: 520px;
}

.hero-badge {
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

/* ─── Sections ────────────────────────────────────────────────────────────── */
.section {
  margin-bottom: 40px;
  animation: fadeUp .5s .15s ease both;
  opacity: 0;
}

.section:nth-child(4) { animation-delay: .2s; }
.section:nth-child(5) { animation-delay: .25s; }

.section-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 20px;
}

.section-header h3 {
  font-family: 'Raleway', sans-serif;
  font-size: 21px;
  font-weight: 700;
  color: var(--dark);
}

.section-header p {
  font-size: 13.5px;
  color: var(--muted);
}

.section-header-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  margin-left: 8px;
}

/* ─── Cards grid ──────────────────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.tool-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  gap: 16px;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  position: relative;
  overflow: hidden;
}

.tool-card::after {
  content: '→';
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%) translateX(4px);
  font-size: 16px;
  color: var(--muted);
  opacity: 0;
  transition: opacity .2s, transform .2s;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #c8d3e6;
}

.tool-card:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.tool-icon {
  width: 52px;
  min-width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--white);
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: 20px;
  flex-shrink: 0;
}

.tool-icon img {
   width: 100%;
  height: 100%;
  object-fit: cover;  /* couvre tout le cadre */
  display: block;
}

.tool-content h4 {
  font-family: 'Raleway', sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--dark);
}

.tool-content p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.school-card {
  border-left: 3px solid var(--gold);
}

/* Icon colors */
.blue     { background: #00a4ef; }
.darkblue { background: #185abd; }
.purple   { background: #5b5fc7; }
.green    { background: #107c41; }
.orange   { background: #d24726; }
.red      { background: #f25022; }
.cyan     { background: #0078d4; }
.violet   { background: #7719aa; }
.school   { background: var(--gold); }
.gray     { background: var(--navy); }
.itschool { background: linear-gradient(135deg, var(--dark), var(--navy)); }

/* ─── Info panel ──────────────────────────────────────────────────────────── */
.info-panel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.info-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.info-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--navy);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.info-box:nth-child(2)::before { background: var(--gold); }
.info-box:nth-child(3)::before { background: var(--dark); }

.info-box h4 {
  font-family: 'Raleway', sans-serif;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--dark);
}

.info-box p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.65;
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 960px) {

  .layout { flex-direction: column; }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    padding: 0 20px 20px;   /* toujours 0 en haut pour le logo */
  }

  .brand {
    margin-left: -20px;
    margin-right: -20px;
    margin-bottom: 16px;
    padding-bottom: 16px;
  }

  .menu {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }

  .menu-label { display: none; }

  .sidebar-footer { display: none; }

  .main-content {
    padding: 20px;
    max-width: 100%;
  }

  .topbar {
    flex-direction: column;
  }

  .topbar-left h2 { font-size: 24px; }

  .topbar-actions { align-items: flex-start; }

  .hero-card {
    flex-direction: column;
    padding: 28px;
  }

  .hero-badge { display: none; }

  .hero-card h3 { font-size: 22px; }
}
