/* =====================================================
   1. VARIABLES
===================================================== */
:root {
  --bg-main: #020617;
  --bg-soft: #0f172a;
  --card-bg: rgba(15, 23, 42, 0.95);

  --text-main: #e5e7eb;
  --text-muted: #94a3b8;

  --accent: #38bdf8;
  --accent-glow: rgba(56, 189, 248, 0.4);
}

/* =====================================================
   2. RESET
===================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =====================================================
   3. BODY + BACKGROUND
===================================================== */
body {
  font-family: "Segoe UI", system-ui, sans-serif;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, #0f172a, #020617);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* fond animé subtil */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(
    rgba(56,189,248,0.15) 1px,
    transparent 1px
  );
  background-size: 40px 40px;
  animation: moveBg 80s linear infinite;
  z-index: -1;
}

@keyframes moveBg {
  from { transform: translateY(0); }
  to { transform: translateY(-1000px); }
}


/* =========================
   HERO / ACCUEIL
========================= */

.hero {
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 25px;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  color: #e5e7eb;
}

.hero h1 span {
  color: #38bdf8;
}

.subtitle {
  font-size: 1.2rem;
  opacity: 0.85;
}

/* =========================
   CHOIX FILIÈRES
========================= */

.choices {
  margin-top: 40px;
  width: 100%;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items:center;
}

.choice-card {
  display: block;
  padding: 26px;
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.9);
  border: 1px solid rgba(56,189,248,0.35);
  color: #ffffff;

  font-size: 1.35rem;      /* 🔥 PLUS GRAND */
  font-weight: 700;        /* 🔥 PLUS LISIBLE */
  letter-spacing: 0.5px;   /* 🔥 PLUS PRO */
  display: block;              /* 🔥 OBLIGATOIRE */
  width: 100%;
  max-width: 900px;
  margin: 0 auto;

  padding: 26px;
  border-radius: 20px;

  background: rgba(2, 6, 23, 0.9);
  border: 1px solid rgba(56,189,248,0.35);

  color: #ffffff;              /* 🔥 TEXTE VISIBLE */
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.5px;

  text-align: center;
  text-decoration: none;       /* 🔥 PAS DE SOULIGNEMENT */

  transition: all 0.35s ease;

  text-decoration: none;
  transition: all 0.35s ease;
}


.choice-card:hover {
  transform: translateY(-6px);
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #020617;
  box-shadow: 0 0 30px rgba(56,189,248,0.5);
}



/* =====================================================
   4. NAVBAR
===================================================== */
header {
  background: rgba(2,6,23,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-actions {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 40px;
}

.btn-link {
  color: #7dd3fc;
  text-decoration: none;
  font-weight: 600;
}

.btn-link:hover {
  color: white;
  text-shadow: 0 0 10px rgba(125,211,252,0.8);
}

.navbar {
  max-width: 1300px;
  margin: 0 auto;
  padding: 22px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration:none;
}

.navbar ul {
  list-style: none;      /* 🔥 supprime les points */
  padding: 0;
  margin: 0;
}




.nav-links {
  list-style: none;
  display: flex;
  gap: 50px;
  align-items: center;
  list-style:none;
  flex-direction: row;
}

.nav-links li {
  list-style: none;
  display: block;
}

.nav-links a {
  color: #ffffff;
  font-size: 1.1rem;       /* 🔥 plus grand */
  font-weight: 600;        /* 🔥 plus lisible */
  letter-spacing: 0.4px;
  padding: 10px 18px;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.nav-links a:hover {
  background: rgba(56,189,248,0.18);
  color: #38bdf8;
}


.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0%;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

a {
  text-decoration: none;   /* 🔥 plus de soulignement */
}



.navbar ul li a:hover {
  background: rgba(56,189,248,0.15);
  color: #38bdf8;
}

.alt-link a {
  color: #38bdf8;
  font-weight: 500;
}

.alt-link a:hover {
  text-decoration: underline;   /* uniquement au hover */
}


.hero-title {
  font-size: 3.2rem;       /* 🔥 beaucoup plus grand */
  font-weight: 800;
  text-align: center;
  margin-bottom: 15px;
  color: #ffffff;
}

.hero-title span {
  color: #38bdf8;          /* bleu ciel sur MonCampus+ */
}

.hero-subtitle {
  text-align: center;
  font-size: 1.15rem;
  color: #cbd5f5;
  margin-bottom: 50px;
}


/* =====================================================
   NAVBAR + LOGO (CORRIGÉ)
===================================================== */
header {
  background: rgba(2,6,23,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.navbar {
  max-width: 1300px;
  margin: 0 auto;
  padding: 22px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* LOGO */
.navbar .logo a {
  color: #38bdf8;       /* BLEU CIEL */
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-decoration: none;
}

/* Hover logo */
.navbar .logo a:hover {
  text-shadow: 0 0 14px rgba(56,189,248,0.7);
}

/* Liens de navigation */
.nav-links {
  display: flex;
  gap: 50px;
  align-items: center;
  list-style: none;
}

.nav-links li {
  list-style: none;
}

.nav-links a {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.nav-links a:hover {
  background: rgba(56,189,248,0.18);
  color: #38bdf8;
}


/* =====================================================
   5. LAYOUT GLOBAL
===================================================== */
main {
  flex: 1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
}

.page {
  animation: pageEnter 0.6s ease forwards;
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =====================================================
   6. AUTH (LOGIN / REGISTER)
===================================================== */
.auth-page {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-box {
  width: 100%;
  max-width: 460px;     /* ✅ moins large */
  padding: 55px 45px;  /* ✅ plus de hauteur visuelle */
  background: var(--card-bg);
  padding: 60px;
  border-radius: 24px;
  box-shadow:
    0 0 60px var(--accent-glow),
    inset 0 0 20px rgba(255,255,255,0.03);
}

.auth-box h2 {
  text-align: center;
  margin-bottom: 30px;
  color: var(--accent);
}

.auth-box input {
  width: 100%;
  padding: 20px;
  font-size: 1.05rem;
  margin-bottom: 24px;
  border-radius: 14px;
  border: none;
  background: #020617;
  color: var(--text-main);
  border: 1px solid rgba(56,189,248,0.35);
}

.auth-box button {
  width: 100%;
  padding: 18px;
  font-size: 1.1rem;
  border-radius: 14px;
  border: none;
  background: linear-gradient(90deg, #38bdf8, #0ea5e9);
  color: #020617;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.auth-box button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px var(--accent-glow);
}

/* =====================================================
   7. CHOIX (FILIÈRE / SEMESTRE)
===================================================== */
.cards {
  display: flex;
  flex-direction: column;
  gap: 26px;
  margin-top: 50px;
}


.card {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 30px;
  border-radius: 18px;

  background: #020617;
  border: 1px solid rgba(56,189,248,0.35);

  text-align: center;
  font-size: 1.35rem;     /* 🔥 PLUS GRAND */
  font-weight: 700;       /* 🔥 PLUS GRAS */
  color: #ffffff;

  text-decoration: none;
  cursor: pointer;

  transition: all 0.3s ease;
}



.card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 0 35px var(--accent-glow);
  color: #ffffff;          /* texte sombre */
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
}

/* =====================================================
   8. FOOTER
===================================================== */
footer {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* =====================================================
   9. RESPONSIVE
===================================================== */

@media (max-width: 768px) {
  .page-title {
    font-size: 2.4rem;
  }

  .card {
    font-size: 1.15rem;
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 2rem;
  }

  .card {
    font-size: 1.05rem;
    padding: 22px;
  }
}


/* =====================
   PAGE MATIERE
===================== */

.page-title {
  font-size: 2.8rem;          /* PLUS GROS */
  font-weight: 700;
  color: #38bdf8;             /* BLEU CIEL */
  text-align: center;
  margin-bottom: 10px;
}

.page-subtitle {
  text-align: center;
  font-size: 1.1rem;
  opacity: 0.8;
  margin-bottom: 40px;
}
on: column;
    gap: 20px;
  }

  .nav-links {
    gap: 20px;
  }

  .auth-box {
    padding: 40px 25px;
  }
}




/* =====================
   NAVIGATION BAS DE PAGE
===================== */

.back-link {
  text-align: center;
  margin-top: 50px;
}

.back-link a {
  font-size: 1.15rem;        /* 🔥 PLUS GRAND */
  font-weight: 600;          /* 🔥 PLUS LISIBLE */
  color: #7dd3fc;            /* BLEU CIEL */
  text-decoration: none;
  transition: all 0.3s ease;
}

.back-link a:hover {
  color: #ffffff;
  text-shadow: 0 0 12px rgba(125,211,252,0.9);
}






/* =====================
   PAGE MATIERE – RESPONSIVE
===================== */

/* Tablettes */
@media (max-width: 900px) {
  .page-title {
    font-size: 2.2rem;
  }

  .page-subtitle {
    font-size: 1rem;
    margin-bottom: 30px;
  }
}

/* Téléphones */
@media (max-width: 600px) {
  .page-title {
    font-size: 1.8rem;
    padding: 0 12px;
  }

  .page-subtitle {
    font-size: 0.95rem;
    padding: 0 15px;
    margin-bottom: 25px;
  }
}

/* Très petits écrans */
@media (max-width: 400px) {
  .page-title {
    font-size: 1.6rem;
  }

  .page-subtitle {
    font-size: 0.9rem;
  }
}


/* =====================
   PAGE MATIERE
===================== */

.page-title {
  font-size: 3.2rem;          /* 🔥 BEAUCOUP PLUS GROS */
  font-weight: 800;           /* 🔥 TRÈS GRAS */
  color: #38bdf8;             /* BLEU CIEL */
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: 1px;
  text-shadow: 0 0 25px rgba(56,189,248,0.45);
}

.page-subtitle {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 500;
  opacity: 0.85;
  margin-bottom: 45px;
}


@media (max-width: 768px) {
  .page-title {
    font-size: 2.4rem;
  }

  .card {
    font-size: 1.15rem;
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 2rem;
  }

  .card {
    font-size: 1.05rem;
    padding: 22px;
  }
}


@media (max-width: 600px) {
  .back-link a,
  .btn-link {
    font-size: 1.05rem;
  }
}






/* =========================
   PAGE COURS
========================= */

.content-box {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 40px;
  background: rgba(15, 23, 42, 0.9);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.15);
}

.content-box h2 {
  color: #7dd3fc;
  margin-bottom: 20px;
}

.course-list {
  margin-top: 20px;
  padding-left: 20px;
}

.course-list li {
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.note {
  margin-top: 25px;
  opacity: 0.8;
  font-size: 0.95rem;
}

.nav-actions {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 30px;
}


.btn-link {
  font-size: 1.15rem;        /* 🔥 AUGMENTATION */
  font-weight: 600;
  color: #7dd3fc;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-link:hover {
  color: #ffffff;
  text-shadow: 0 0 12px rgba(125,211,252,0.9);
}





/* =====================
   PAGE MATIERE
===================== */

.page-title {
  font-size: 2.8rem;          /* PLUS GROS */
  font-weight: 700;
  color: #38bdf8;             /* BLEU CIEL */
  text-align: center;
  margin-bottom: 10px;
}

.page-subtitle {
  text-align: center;
  font-size: 1.1rem;
  opacity: 0.8;
  margin-bottom: 40px;
}


/* ===== Dashboard : changement de filière ===== */
.dashboard-form {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;              /* centre le bloc */
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.dashboard-form button.card {
  width: 100%;
  max-width: 600px;            /* largeur propre */
  border: none;
  background: #020617;
  cursor: pointer;
}

.dashboard-form .page-subtitle {
  text-align: center;
  margin-bottom: 10px;
}



/* =========================
   FORMULAIRE UPLOAD
========================= */

.auth-box {
  display: flex;
  flex-direction: column;
  gap: 18px;                 /* espace régulier entre champs */
  max-width: 520px;
  margin: 0 auto;
}

/* Inputs & selects */
.auth-box input[type="text"],
.auth-box input[type="number"],
.auth-box input[type="file"],
.auth-box select {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(56,189,248,0.35);
  background: #020617;
  color: #e5e7eb;
  outline: none;
}

/* Désactivé */
.auth-box select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Focus */
.auth-box input:focus,
.auth-box select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56,189,248,0.35);
}

/* Bouton */
.auth-box button {
  margin-top: 10px;
  padding: 16px;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #020617;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-box button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(56,189,248,0.5);
}

/* =========================
   APERÇU FICHIERS
========================= */

#preview {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#preview embed {
  border-radius: 12px;
  border: 1px solid rgba(56,189,248,0.25);
}

#preview img {
  border-radius: 12px;
  border: 1px solid rgba(56,189,248,0.25);
  max-width: 100%;
}


/* =====================================================
   UPLOAD – DESIGN AVANCÉ
===================================================== */

.upload-wrapper {
  max-width: 560px;
  margin: 0 auto;
}

/* Carte principale */
.auth-box {
  background: rgba(2, 6, 23, 0.95);
  border: 1px solid rgba(56,189,248,0.25);
  border-radius: 22px;
  padding: 40px 36px;
  box-shadow:
    0 0 60px rgba(56,189,248,0.15),
    inset 0 0 25px rgba(255,255,255,0.03);

  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Titres de section */
.form-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-section h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #7dd3fc;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

/* Champs */
.auth-box input,
.auth-box select {
  width: 100%;
  padding: 15px 16px;
  font-size: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(56,189,248,0.35);
  background: #020617;
  color: #e5e7eb;
  transition: all 0.25s ease;
}

/* Focus */
.auth-box input:focus,
.auth-box select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 14px rgba(56,189,248,0.45);
  transform: translateY(-1px);
}

/* Désactivé */
.auth-box select:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Upload fichier */
.auth-box input[type="file"] {
  padding: 12px;
  background: rgba(15, 23, 42, 0.85);
}

/* Bouton */
.auth-box button {
  margin-top: 10px;
  padding: 18px;
  font-size: 1.1rem;
  font-weight: 800;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #020617;
  letter-spacing: 0.5px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.auth-box button:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(56,189,248,0.55);
}

/* =====================================================
   APERÇU FICHIERS
===================================================== */

#preview {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 10px;
}

#preview embed {
  height: 420px;
  border-radius: 16px;
  border: 1px solid rgba(56,189,248,0.3);
  background: #020617;
}

#preview img {
  max-width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(56,189,248,0.3);
}


/* =====================================================
   AFFICHAGE FICHIERS
===================================================== */

.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 40px;
}

.file-card {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(56,189,248,0.25);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.3s ease;
}

.file-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 30px rgba(56,189,248,0.4);
}

.file-title {
  font-size: 1rem;
  font-weight: 700;
  color: #7dd3fc;
}

.file-preview embed {
  width: 100%;
  height: 320px;
  border-radius: 14px;
  border: none;
}

.file-preview img {
  width: 100%;
  border-radius: 14px;
}

.file-actions {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.file-actions a,
.file-actions form button {
  flex: 1;
  padding: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 12px;
  text-align: center;
  border: none;
  cursor: pointer;
}

.btn-download {
  background: rgba(56,189,248,0.15);
  color: #7dd3fc;
}

.btn-delete {
  background: rgba(239,68,68,0.15);
  color: #f87171;
}

.btn-delete:hover {
  background: rgba(239,68,68,0.35);
}



/* ===============================
   RECHERCHE GLOBALE
=============================== */
B
.search-box {
  max-width: 700px;
  margin: 40px auto 60px;
  display: flex;
  gap: 15px;
}

.search-box input {
  flex: 1;
  padding: 18px 22px;
  border-radius: 16px;
  border: 1px solid rgba(56,189,248,0.35);
  background: rgba(2,6,23,0.9);
  color: #e5e7eb;
  font-size: 1.05rem;
  outline: none;
}

.search-box input::placeholder {
  color: #94a3b8;
}

.search-box input:focus {
  box-shadow: 0 0 0 3px rgba(56,189,248,0.25);
}

.search-box button {
  padding: 18px 26px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #020617;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-box button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(56,189,248,0.6);
}

/* ===============================
   RÉSULTATS
=============================== */

.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.file-card {
  background: rgba(15, 23, 42, 0.95);
  border-radius: 20px;
  padding: 22px;
  border: 1px solid rgba(56,189,248,0.25);
  transition: all 0.3s ease;
  box-shadow: 0 0 30px rgba(56,189,248,0.08);
}

.file-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 40px rgba(56,189,248,0.35);
}

.file-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #e5e7eb;
  margin-bottom: 6px;
}

.file-meta {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 14px;
}

/* ===============================
   APERÇU FICHIERS
=============================== */

.file-preview {
  margin-bottom: 15px;
}

.file-preview embed {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  background: #020617;
}

.file-preview img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
}

/* ===============================
   ACTIONS
=============================== */

.file-actions {
  display: flex;
  justify-content: center;
}

.btn-download {
  padding: 10px 18px;
  border-radius: 12px;
  background: rgba(56,189,248,0.15);
  color: #38bdf8;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-download:hover {
  background: #38bdf8;
  color: #020617;
  box-shadow: 0 0 20px rgba(56,189,248,0.6);
}

/* ===============================
   RESPONSIVE
=============================== */

@media (max-width: 768px) {
  .search-box {
    flex-direction: column;
  }

  .search-box button {
    width: 100%;
  }
}
/* ===============================
   NAVBAR – VERSION AÉRÉE
=============================== */

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 18px 60px; /* 👈 espace gauche / droite */
  background: linear-gradient(
    180deg,
    rgba(2,6,23,0.95),
    rgba(2,6,23,0.85)
  );

  border-bottom: 1px solid rgba(56,189,248,0.15);
}

/* LOGO À GAUCHE */
.navbar .logo {
  flex: 0 0 auto;
}

.navbar .logo a {
  font-size: 1.8rem;
  font-weight: 800;
  color: #38bdf8;
  text-decoration: none;
  letter-spacing: 0.5px;
}

/* LIENS À DROITE */
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px; /* 👈 espace entre les mots */
}

/* LIENS */
.nav-links li {
  list-style: none;
}

.nav-links a {
  color: #e5e7eb;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  letter-spacing: 0.4px;
  transition: all 0.25s ease;
}

/* HOVER */
.nav-links a:hover {
  color: #38bdf8;
  text-shadow: 0 0 10px rgba(56,189,248,0.5);
}

/* TEXTE BONJOUR */
.welcome-user {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-right: 10px;
}

/* ===============================
   RESPONSIVE
=============================== */

@media (max-width: 900px) {
  .navbar {
    padding: 15px 25px;
  }

  .nav-links {
    gap: 18px;
  }
}



/* ===============================
   NAVBAR FULL WIDTH FIX
=============================== */

header {
  width: 100%;
}

.navbar {
  width: 100%;
  max-width: 100%;
  margin: 0;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 22px 80px; /* 👈 vrai espace gauche / droite */
  box-sizing: border-box;

  background: linear-gradient(
    180deg,
    rgba(2,6,23,0.98),
    rgba(2,6,23,0.90)
  );

  border-bottom: 1px solid rgba(56,189,248,0.18);
}

/* ===============================
   LOGO (PLUS GRAND + IMPACTANT)
=============================== */

.navbar .logo a {
  font-size: 2.3rem;       /* 👈 PLUS GRAND */
  font-weight: 900;
  color: #38bdf8;
  letter-spacing: 1px;
  text-decoration: none;
  text-transform: uppercase;
}

/* ===============================
   LIENS À DROITE
=============================== */

.nav-links {
  display: flex;
  align-items: center;
  gap: 38px; /* 👈 plus d’espace entre les liens */
}

/* Liens */
.nav-links a {
  font-size: 1.05rem;      /* 👈 plus lisible */
  font-weight: 600;
  color: #e5e7eb;
  text-decoration: none;
  letter-spacing: 0.6px;
  position: relative;
  transition: all 0.3s ease;
}

/* Hover élégant */
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: #38bdf8;
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: #38bdf8;
}

.nav-links a:hover::after {
  width: 100%;
}

/* ===============================
   TEXTE BONJOUR
=============================== */

.welcome-user {
  color: #94a3b8;
  font-size: 0.95rem;
  margin-right: 10px;
}

/* ===============================
   RESPONSIVE
=============================== */

@media (max-width: 900px) {
  .navbar {
    padding: 18px 25px;
  }

  .navbar .logo a {
    font-size: 1.6rem;
  }

  .nav-links {
    gap: 18px;
  }
}



.alert {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-weight: 600;
}

.alert-danger {
  background: #2a0f12;
  color: #ff6b6b;
  border: 1px solid #ff6b6b;
}

.alert-success {
  background: #0f2a1a;
  color: #4ade80;
  border: 1px solid #4ade80;
}



.feedback-section {
  max-width: 900px;
  margin: 80px auto;
  padding: 50px;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 24px;
  box-shadow: 0 0 40px rgba(56,189,248,0.15);
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.feedback-form input,
.feedback-form textarea {
  padding: 16px;
  border-radius: 14px;
  border: none;
  background: #020617;
  color: #e5e7eb;
  border: 1px solid rgba(56,189,248,0.35);
}

.feedback-form textarea {
  min-height: 120px;
  resize: vertical;
}

.feedback-form button {
  align-self: flex-start;
  padding: 14px 30px;
  background: linear-gradient(90deg,#38bdf8,#0ea5e9);
  border: none;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
}

.about-section {
  max-width: 900px;
  margin: 80px auto;
  padding: 50px;
  background: rgba(2,6,23,0.95);
  border-radius: 24px;
}

.about-text {
  font-size: 1.05rem;
  opacity: 0.85;
  margin-bottom: 25px;
}

.about-list {
  list-style: none;
  margin-bottom: 30px;
}

.about-list li {
  margin-bottom: 10px;
}

.donation-box {
  margin-top: 40px;
  padding: 30px;
  border-radius: 20px;
  background: rgba(56,189,248,0.08);
  border: 1px solid rgba(56,189,248,0.25);
}

.don-note {
  font-size: 1.1rem;
  margin-top: 10px;
}


/* ===============================
   SECTION : NOTER MONCAMPUS+
================================ */

.rating-section {
  max-width: 700px;
  margin: 60px auto;
  padding: 30px;
  background: #0f172a;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  color: #e5e7eb;
}

.rating-section h2 {
  text-align: center;
  font-size: 1.6rem;
  margin-bottom: 10px;
  color: #38bdf8;
}

.rating-section p {
  text-align: center;
  font-size: 0.95rem;
  color: #cbd5f5;
  margin-bottom: 25px;
}

/* ===== ÉTOILES ===== */
.star-rating {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 25px;
}

.star-rating input {
  display: none;
}

.star-rating label {
  font-size: 2.2rem;
  color: #334155;
  cursor: pointer;
  transition: color 0.25s ease, transform 0.2s ease;
}

.star-rating label:hover,
.star-rating label:hover ~ label {
  color: #facc15;
  transform: scale(1.1);
}

.star-rating input:checked ~ label {
  color: #facc15;
}

/* ===== TEXTE AVIS ===== */
.rating-section textarea {
  width: 100%;
  min-height: 110px;
  padding: 12px;
  border-radius: 10px;
  border: none;
  resize: vertical;
  font-size: 0.95rem;
  background: #020617;
  color: #e5e7eb;
  margin-bottom: 20px;
}

.rating-section textarea::placeholder {
  color: #64748b;
}

/* ===== BOUTON ===== */
.rating-section button {
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #020617;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rating-section button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(56,189,248,0.35);
}

/* ===== MESSAGE SUCCESS / ERREUR ===== */
.rating-alert {
  margin-top: 20px;
  padding: 12px;
  border-radius: 10px;
  text-align: center;
  font-size: 0.9rem;
}

.rating-alert.success {
  background: rgba(34,197,94,0.15);
  color: #22c55e;
}

.rating-alert.error {
  background: rgba(239,68,68,0.15);
  color: #ef4444;
}


.card.done {
  opacity: 0.6;
  text-decoration: line-through;
}

/* =====================
   NAVBAR - RECHERCHE
===================== */

.nav-search {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-search input {
  width: 100%;
  max-width: 320px;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid rgba(56,189,248,0.4);
  background: #020617;
  color: #e5e7eb;
  font-size: 0.95rem;
}

.nav-search input::placeholder {
  color: #94a3b8;
}

.nav-search input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56,189,248,0.4);
}



/* ===============================
   FIX NAVBAR RESPONSIVE
=============================== */

/* Écrans larges (desktop) */
@media (min-width: 1200px) {
  .navbar {
    padding-left: 60px;
    padding-right: 60px;
  }
}

/* Laptops / tablettes */
@media (max-width: 1024px) {
  .navbar {
    padding: 18px 30px;
  }

  .nav-links {
    gap: 18px;
  }

  .nav-links a {
    font-size: 0.95rem;
    padding: 6px 10px;
  }
}

/* Téléphones */
@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .logo {
    width: 100%;
    text-align: center;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }
}

/* Très petits téléphones (iPhone X, etc.) */
@media (max-width: 400px) {
  .nav-links a {
    font-size: 0.85rem;
    padding: 5px 8px;
  }
}


/* ===============================
   FIX CARDS RESPONSIVE
=============================== */

.card,
.choice-card {
  max-width: 100%;
}

/* Laptops */
@media (max-width: 1200px) {
  .card,
  .choice-card {
    font-size: 1.15rem;
    padding: 24px;
  }
}

/* Tablettes */
@media (max-width: 768px) {
  .card,
  .choice-card {
    font-size: 1.05rem;
    padding: 20px;
  }
}

/* Téléphones */
@media (max-width: 480px) {
  .card,
  .choice-card {
    font-size: 0.95rem;
    padding: 16px;
  }
}






/* ===============================
   AFFICHAGE FICHIERS HORIZONTAL
=============================== */

.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

/* Petits écrans */
@media (max-width: 600px) {
  .files-grid {
    grid-template-columns: 1fr;
  }
}


/* ===============================
   FIX DÉBORDEMENT MOBILE
=============================== */

body,
html {
  width: 100%;
  overflow-x: hidden;
}

* {
  max-width: 100%;
}



/* ===============================
   SEARCH BAR – GRAND ÉCRAN
=============================== */

/* Écrans larges (Full HD / 2K / 4K) */
@media (min-width: 1400px) {
  .nav-search input {
    max-width: 420px;
    font-size: 1.05rem;
    padding: 10px 18px;
  }
}

/* Très grands écrans */
@media (min-width: 1800px) {
  .nav-search input {
    max-width: 480px;
    font-size: 1.1rem;
  }
}


/* ===============================
   NAVBAR – ESPACEMENT LIENS
=============================== */

/* Desktop normal */
@media (min-width: 1100px) {
  .nav-links {
    gap: 26px;
  }
}

/* Laptops / tablettes larges */
@media (max-width: 1100px) {
  .nav-links {
    gap: 18px;
  }
}

/* Téléphones */
@media (max-width: 768px) {
  .nav-links {
    gap: 12px;
  }
}




/* ===============================
   MOBILE UNIVERSAL FIX
=============================== */

/* iPhone X / 12 mini / petits Android */
@media (max-width: 375px) {
  .nav-links a {
    font-size: 0.82rem;
    padding: 4px 6px;
  }

  .nav-search input {
    font-size: 0.9rem;
    padding: 7px 12px;
  }
}

/* iPhone Pro / Android moyens */
@media (max-width: 430px) {
  .navbar {
    padding: 14px 18px;
  }
}

/* Grands téléphones */
@media (max-width: 480px) {
  .card {
    font-size: 0.95rem;
  }
}

/* ===============================
   MOBILE UNIVERSAL FIX
=============================== */

/* iPhone X / 12 mini / petits Android */
@media (max-width: 375px) {
  .nav-links a {
    font-size: 0.82rem;
    padding: 4px 6px;
  }

  .nav-search input {
    font-size: 0.9rem;
    padding: 7px 12px;
  }
}

/* iPhone Pro / Android moyens */
@media (max-width: 430px) {
  .navbar {
    padding: 14px 18px;
  }
}

/* Grands téléphones */
@media (max-width: 480px) {
  .card {
    font-size: 0.95rem;
  }
}



/* ===============================
   MOBILE UNIVERSAL FIX
=============================== */

/* iPhone X / 12 mini / petits Android */
@media (max-width: 375px) {
  .nav-links a {
    font-size: 0.82rem;
    padding: 4px 6px;
  }

  .nav-search input {
    font-size: 0.9rem;
    padding: 7px 12px;
  }
}

/* iPhone Pro / Android moyens */
@media (max-width: 430px) {
  .navbar {
    padding: 14px 18px;
  }
}

/* Grands téléphones */
@media (max-width: 480px) {
  .card {
    font-size: 0.95rem;
  }
}



/* ===============================
   MOBILE UNIVERSAL FIX
=============================== */

/* iPhone X / 12 mini / petits Android */
@media (max-width: 375px) {
  .nav-links a {
    font-size: 0.82rem;
    padding: 4px 6px;
  }

  .nav-search input {
    font-size: 0.9rem;
    padding: 7px 12px;
  }
}

/* iPhone Pro / Android moyens */
@media (max-width: 430px) {
  .navbar {
    padding: 14px 18px;
  }
}

/* Grands téléphones */
@media (max-width: 480px) {
  .card {
    font-size: 0.95rem;
  }
}






/* ===============================
   STABILITÉ RESPONSIVE
=============================== */

img,
embed,
iframe {
  max-width: 100%;
  height: auto;
}

.container,
.navbar,
.cards,
.files-grid {
  width: 100%;
}



/* =====================================================
   AFFICHAGE HORIZONTAL DES FICHIERS
   (cours / tdtp / khints / ressources / github)
===================================================== */

.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 26px;
  margin-top: 40px;
}

/* Tablettes */
@media (max-width: 900px) {
  .files-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

/* Téléphones (iPhone X → iPhone 17 inclus) */
@media (max-width: 600px) {
  .files-grid {
    grid-template-columns: 1fr;
  }
}


/* ===============================
   AJUSTEMENT DESKTOP (Windows)
   écrans larges + DPI élevé
================================ */

@media (min-width: 1200px) {
  .card,
  .choice-card,
  .file-card {
    max-width: 780px;     /* 🔥 avant : trop large */
    font-size: 1.05rem;  /* 🔥 texte plus équilibré */
    padding: 22px;
  }

  .auth-box {
    max-width: 420px;    /* 🔥 formulaires moins gros */
    padding: 40px 32px;
  }
}


/* ===============================
   BARRE DE RECHERCHE – FIX
================================ */

.nav-search {
  flex: 1;
  max-width: 420px;
}

.nav-search input {
  width: 100%;
  min-width: 0; /* 🔥 essentiel pour Windows */
  padding: 10px 16px;
  font-size: 0.95rem;
}



/* ===============================
   NAVBAR – ESPACEMENT DESKTOP
================================ */

@media (min-width: 1200px) {
  .nav-links {
    gap: 26px;   /* 🔥 avant trop espacé */
  }

  .nav-links a {
    font-size: 0.95rem;
    padding: 8px 12px;
  }
}



/* ===============================
   CORRECTION DPI WINDOWS
================================ */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}


/* ===============================
   COURS – GRILLE ADAPTÉE
================================ */

.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

/* Laptops */
@media (max-width: 1400px) {
  .files-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

/* Tablettes */
@media (max-width: 900px) {
  .files-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

/* Téléphones */
@media (max-width: 600px) {
  .files-grid {
    grid-template-columns: 1fr;
  }
}


/* ===============================
   FIX BARRE DE RECHERCHE WINDOWS
   (Chrome / DPI / Flexbox)
================================ */

/* Autorise le calcul correct des largeurs */
.navbar,
.nav-search,
.nav-links {
  min-width: 0;
}

/* Barre de recherche */
.nav-search {
  flex: 1 1 auto;
  max-width: 420px;
  overflow: visible; /* 🔥 essentiel */
}

/* Champ */
.nav-search input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Empêche body de couper l'input */
body {
  overflow-x: visible;
}





/* =====================================================
   NAVBAR — AJUSTEMENT TEXTE POUR ÉCRANS LARGES
===================================================== */

@media (min-width: 1200px) {

  .navbar {
    flex-wrap: nowrap;
  }

  /* Recherche : largeur stable mais raisonnable */
  .nav-search {
    flex: 0 0 300px;
    max-width: 300px;
  }

  .nav-search input {
    width: 100%;
    font-size: 0.9rem;
  }

  /* Liens navbar : réduction TRÈS légère */
  .nav-links {
    gap: 18px;
  }

  .nav-links a {
    font-size: 0.9rem;     /* 👈 clé du fix */
    white-space: nowrap;
  }

  /* Bonjour utilisateur */
  .welcome-user {
    font-size: 0.85rem;
    white-space: nowrap;
  }
}



.navbar * {
  min-width: 0;
}


@media (min-width: 1200px) {
  .navbar {
    padding-left: 24px;   /* réduit l’espace gauche */
  }

  .navbar .logo {
    margin-left: 0;
  }
}



.file-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-title:hover {
  white-space: normal;
  word-break: break-word;
}



/* =========================
   KHINTS CC / DS TABS
========================= */
.khints-tabs {
  display: flex;
  gap: 15px;
  margin: 20px 0 30px;
}

.khints-tab {
  padding: 10px 22px;
  border-radius: 30px;
  background: rgba(255,255,255,0.08);
  color: #9fdcff;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(255,255,255,0.15);
}

.khints-tab:hover {
  background: rgba(0,180,255,0.2);
  color: #fff;
}

.khints-tab.active {
  background: linear-gradient(135deg, #00b4ff, #0077ff);
  color: #fff;
  box-shadow: 0 0 15px rgba(0,180,255,0.5);
}



.khints-tabs {
  justify-content: center;
}



.logo img {
  width: 47px;
  height: 47px;
  border-radius: 50%;
  object-fit: cover;
}

.welcome-container {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.welcome-container h1 {
  font-size: 3rem;
  margin-bottom: 10px;
}

.welcome-container h1 span {
  color: #3cc2ff;
}

.welcome-subtitle {
  opacity: 0.8;
  margin-bottom: 30px;
}

.welcome-actions {
  display: flex;
  gap: 20px;
  margin-bottom: 40px;
}

.btn-primary, .btn-secondary, .btn-wave {
  padding: 12px 22px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
}

.btn-primary {
  background: #3cc2ff;
  color: #000;
}

.btn-secondary {
  border: 1px solid #3cc2ff;
  color: #3cc2ff;
}

.btn-wave {
  background: #00c853;
  color: #fff;
}


/* LOGO */
.site-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 50%;
}

/* TEXTE MONCAMPUS+ */
.site-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.5px;
  text-transform:none;
} 


/* ===============================
   RESPONSIVE
================================ */

@media (max-width: 768px) {
  .site-title {
    font-size: 1.3rem;
  }

  .nav-links {
    gap: 14px;
  }

  .nav-links a {
    font-size: 0.9rem;
  }
}






/* ===============================
   HEADER MODERNE
================================ */

header {
  width: 100%;
  background: rgba(2, 6, 23, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(56,189,248,0.15);
}

/* NAVBAR */
.navbar {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 32px;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* LOGO + TEXTE */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* LOGO */
.site-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 50%;
}

/* TEXTE MONCAMPUS+ */
.site-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.5px;
}


.logo a {
  font-size: 1.8rem;
  font-weight: 800;
  color: #38bdf8;
  text-decoration: none;
  letter-spacing: 0.5px;
  text-transform: none !important; /* 🔥 force la casse */
}


.btn-github {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 8px;
  background: #24292e;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}

.btn-github:hover {
  background: #000;
}


/* ===============================
   BOUTON GITHUB (MATIÈRES)
================================ */

.btn-github {
  background: linear-gradient(135deg, #24292e, #2f363d);
  color: #fff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  font-weight: 600;
  letter-spacing: 0.3px;

  border-radius: 14px;
  padding: 18px 20px;
  text-decoration: none;

  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  transition: all 0.25s ease;
}

/* Icône GitHub */
.btn-github::before {
  content: ""; /* icône GitHub (Font Awesome) */
  font-family: "Font Awesome 6 Brands";
  font-size: 20px;
}

/* Hover */
.btn-github:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
  background: linear-gradient(135deg, #2f363d, #24292e);
}

/* Mobile */
@media (max-width: 600px) {
  .btn-github {
    font-size: 15px;
    padding: 14px;
  }
}



/* ===== KHINTS CC / DS ===== */
.khints-switch {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 20px 0;
}

.khints-switch a {
    padding: 8px 18px;
    border-radius: 20px;
    background: #e5e7eb;
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.khints-switch a.active {
    background: #2563eb;
    color: #fff;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0;
}

.pagination a {
    padding: 8px 14px;
    border-radius: 6px;
    background: #f1f1f1;
    color: #333;
    text-decoration: none;
}

.pagination a.active {
    background: #2563eb;
    color: #fff;
}

.pagination a:hover {
    background: #1d4ed8;
    color: #fff;
}

/* ===== NOM DE FICHIER LONG ===== */
.file-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* =========================
   TRI KHINTS
========================= */
.khints-sort {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 20px 0 25px;
    flex-wrap: wrap;
}

.khints-sort a {
    padding: 8px 16px;
    border-radius: 20px;
    background: #f1f3f5;
    color: #333;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.khints-sort a:hover {
    background: #e7f1ff;
    color: #0d6efd;
    border-color: #0d6efd;
}

.khints-sort a.active {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}
