/* ════════════════════════════════════════════════════════════
   Album des Finissants — feuille de style principale
   ════════════════════════════════════════════════════════════ */

/* ── Variables ── */
:root {
  --accent:     #2e86de;
  --accent-dk:  #1a6bbf;
  --success:    #27ae60;
  --danger:     #e74c3c;
  --warning:    #f39c12;
  --info:       #2980b9;

  --bg:         #f0f4f8;
  --bg-alt:     #e8edf3;
  --card-bg:    #ffffff;
  --input-bg:   #f8fafc;
  --border:     #cdd5e0;

  --text:       #2c3e50;
  --text-dark:  #1a252f;
  --text-muted: #7f8c9b;

  --header-h:   64px;
  --radius:     12px;
  --shadow:     0 4px 20px rgba(0,0,0,.08);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body   { font-family: 'Poppins', Arial, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
a      { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }

/* ══════════════════════════════════════════
   HEADER / NAV
══════════════════════════════════════════ */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: linear-gradient(135deg, #1a3a6b, #2e86de);
  color: #fff; height: var(--header-h);
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 1.5rem; height: 100%;
  display: flex; align-items: center; gap: 1.5rem;
}
.logo {
  font-size: 1.2rem; font-weight: 700; white-space: nowrap;
  display: flex; align-items: center; gap: .5rem; color: #fff;
}

/* Burger (mobile) */
.burger {
  display: none; flex-direction: column; justify-content: space-around;
  width: 32px; height: 26px; background: none; border: none;
  cursor: pointer; margin-left: auto;
}
.burger span { display: block; height: 3px; background: #fff; border-radius: 2px; transition: .3s; }

/* Nav */
.main-nav {
  display: flex; align-items: center; gap: .25rem; flex-wrap: nowrap;
}
.nav-link {
  padding: .45rem .9rem; border-radius: 8px; color: #fff; font-size: .9rem;
  transition: background .2s;
}
.nav-link:hover { background: rgba(255,255,255,.18); }

/* Dropdown */
.dropdown { position: relative; }
.dropbtn {
  background: none; border: none; cursor: pointer; color: #fff;
  font-family: inherit; font-size: .9rem; padding: .45rem .9rem;
  border-radius: 8px; display: flex; align-items: center; gap: .4rem;
  transition: background .2s;
}
.dropbtn:hover, .dropdown:hover .dropbtn { background: rgba(255,255,255,.18); }
.dropdown-content {
  display: none; position: absolute; top: 110%; left: 0;
  min-width: 230px; background: #fff; border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,.15); overflow: hidden; z-index: 999;
}
.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content { display: block; }
.dropdown-content a {
  display: block; padding: .65rem 1.1rem; color: var(--text);
  font-size: .9rem; transition: background .15s;
}
.dropdown-content a:hover { background: var(--bg); color: var(--accent); }

/* Responsive header */
@media (max-width: 820px) {
  .burger { display: flex; }
  .main-nav {
    display: none; flex-direction: column; align-items: flex-start;
    position: fixed; top: var(--header-h); right: 0; left: 0;
    background: #1a3a6b; padding: 1rem; gap: .5rem;
  }
  .main-nav.open { display: flex; }
  .dropdown-content { position: static; box-shadow: none; background: rgba(255,255,255,.08); }
  .dropdown-content a { color: #fff; padding: .5rem 1.5rem; }
  .dropdown-content a:hover { background: rgba(255,255,255,.1); }
}

/* ══════════════════════════════════════════
   FLASH MESSAGES
══════════════════════════════════════════ */
.flash-container { max-width: 900px; margin: 1rem auto; padding: 0 1rem; }
.flash {
  padding: .85rem 1.2rem; border-radius: 10px; margin-bottom: .6rem;
  font-size: .95rem; font-weight: 500;
}
.flash-success { background: #d5f5e3; color: #1a7040; border-left: 4px solid var(--success); }
.flash-danger  { background: #fadbd8; color: #922b21; border-left: 4px solid var(--danger); }
.flash-warning { background: #fef9e7; color: #7d6608; border-left: 4px solid var(--warning); }
.flash-info    { background: #d6eaf8; color: #1a5276; border-left: 4px solid var(--info); }

/* ══════════════════════════════════════════
   MAIN / FOOTER
══════════════════════════════════════════ */
.site-main { max-width: 1200px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }

.site-footer {
  background: #1a3a6b; color: rgba(255,255,255,.75);
  text-align: center; padding: 1.5rem 1rem; font-size: .875rem;
}
.site-footer p { margin: .3rem 0; }
.site-footer a { color: rgba(255,255,255,.9); text-decoration: underline; }

/* ══════════════════════════════════════════
   PAGE HEADER
══════════════════════════════════════════ */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem; margin-bottom: 1.75rem;
}
.page-header h1 { font-size: 1.7rem; color: var(--text-dark); }

/* ══════════════════════════════════════════
   HERO (index)
══════════════════════════════════════════ */
.hero {
  text-align: center; padding: 3rem 1rem 2rem;
  background: linear-gradient(135deg, #1a3a6b 0%, #2e86de 100%);
  border-radius: var(--radius); color: #fff; margin-bottom: 2.5rem;
}
.hero h1 { font-size: clamp(1.5rem, 4vw, 2.6rem); font-weight: 700; line-height: 1.3; }
.hero-sub { margin-top: .75rem; font-size: 1.1rem; opacity: .9; }

/* Filières grid (index) */
.filieres-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
}
.filiere-card {
  background: var(--card-bg); border-radius: var(--radius); padding: 1.75rem 1rem;
  text-align: center; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; gap: .75rem;
  transition: transform .2s, box-shadow .2s; color: var(--text);
}
.filiere-card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(0,0,0,.13); }
.filiere-card i { color: var(--accent); }
.filiere-card h2 { font-size: 1rem; font-weight: 600; }
.btn-voir {
  margin-top: auto; font-size: .85rem; padding: .4rem .9rem;
  background: var(--accent); color: #fff; border-radius: 20px;
}

/* ══════════════════════════════════════════
   FILTRES
══════════════════════════════════════════ */
.filtres-form {
  display: flex; flex-wrap: wrap; gap: .75rem; align-items: center;
  background: var(--card-bg); padding: 1rem 1.25rem;
  border-radius: var(--radius); margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.filtres-form select {
  padding: .55rem .9rem; border: 1.5px solid var(--border);
  border-radius: 8px; font-family: inherit; font-size: .9rem;
  background: var(--input-bg); color: var(--text); min-width: 180px;
}
.result-count { font-size: .9rem; color: var(--text-muted); margin-bottom: 1rem; }

/* ══════════════════════════════════════════
   CARDS (liste)
══════════════════════════════════════════ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}
.student-card {
  background: var(--card-bg); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s; color: var(--text);
}
.student-card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(0,0,0,.13); }
.student-photo {
  width: 100%; aspect-ratio: 1; object-fit: cover;
}
.student-photo-placeholder {
  width: 100%; aspect-ratio: 1;
  background: var(--bg-alt); display: flex; align-items: center;
  justify-content: center; color: var(--text-muted);
}
.student-info { padding: 1rem; flex: 1; display: flex; flex-direction: column; gap: .25rem; }
.student-info h3 { font-size: 1rem; font-weight: 600; }
.student-programme { font-size: .85rem; color: var(--accent); font-weight: 500; }
.student-profil, .student-annee { font-size: .8rem; color: var(--text-muted); }
.student-interets { font-size: .82rem; margin-top: .4rem; }

/* Empty state */
.empty-state {
  text-align: center; padding: 4rem 2rem; color: var(--text-muted);
  display: flex; flex-direction: column; align-items: center; gap: 1.25rem;
}

/* ══════════════════════════════════════════
   PROFIL
══════════════════════════════════════════ */
.profil-container { max-width: 960px; margin: 0 auto; }
.profil-header { display: flex; gap: .75rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.profil-card {
  background: var(--card-bg); border-radius: var(--radius);
  box-shadow: var(--shadow); display: grid;
  grid-template-columns: 280px 1fr; gap: 2rem; padding: 2rem;
}
@media (max-width: 700px) {
  .profil-card { grid-template-columns: 1fr; }
}
.profil-photo { width: 100%; border-radius: var(--radius); object-fit: cover; }
.profil-photo-placeholder {
  width: 100%; aspect-ratio: 1; background: var(--bg-alt);
  border-radius: var(--radius); display: flex; align-items: center;
  justify-content: center; color: var(--text-muted);
}
.profil-video-wrap { margin-top: 1.25rem; }
.video-label { font-size: .85rem; font-weight: 600; margin-bottom: .4rem; color: var(--text-muted); }
.profil-video { width: 100%; border-radius: 8px; }
.profil-nom { font-size: 1.75rem; font-weight: 700; }
.profil-filiere-badge {
  display: inline-block; background: var(--accent); color: #fff;
  font-size: .8rem; font-weight: 600; padding: .25rem .8rem;
  border-radius: 20px; margin: .5rem 0 1rem;
}
.profil-table { width: 100%; border-collapse: collapse; margin-top: .5rem; }
.profil-table th, .profil-table td {
  padding: .6rem .75rem; text-align: left;
  border-bottom: 1px solid var(--border); font-size: .95rem;
}
.profil-table th { color: var(--text-muted); font-weight: 600; width: 1%; white-space: nowrap; }

/* ══════════════════════════════════════════
   BOUTONS
══════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1.2rem; border-radius: 8px; font-family: inherit;
  font-size: .95rem; font-weight: 600; cursor: pointer;
  border: 2px solid transparent; transition: all .2s;
}
.btn-primary  { background: var(--accent);   color: #fff; border-color: var(--accent); }
.btn-primary:hover  { background: var(--accent-dk); border-color: var(--accent-dk); }
.btn-secondary{ background: #6c757d; color: #fff; border-color: #6c757d; }
.btn-secondary:hover{ background: #565e64; }
.btn-outline  { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-outline:hover  { background: var(--accent); color: #fff; }
.btn-sm { padding: .35rem .85rem; font-size: .85rem; }
