/* =========================================================
   Bac Pro CIEL — Lycée Gustave Eiffel (Kahani)
   Thème : sombre « cyber » avec accents cyan / vert
   ========================================================= */

:root {
  --bg: #04070e;
  --bg-2: #060b16;
  --card: #0c1424;
  --card-2: #111c33;
  --border: #22335c;
  --text: #eef3ff;
  --text-dim: #aebcdd;
  --cyan: #22d3ee;
  --green: #34d399;
  --accent: #22d3ee;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Navigation ---------- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(4, 7, 14, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  width: 100%; max-width: 1400px; margin: 0 auto; padding: 10px 26px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px;
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-text { white-space: nowrap; }
.brand-logo { height: 85px; width: 85px; object-fit: cover; border-radius: 50%;
  border: 2px solid var(--border); flex-shrink: 0; }
@media (max-width: 1500px) { .brand-logo { height: 64px; width: 64px; } }
@media (max-width: 640px) { .brand-logo { height: 40px; width: 40px; } }
.brand-badge {
  background: linear-gradient(135deg, var(--cyan), var(--green));
  color: #04121f; font-weight: 800; font-size: 0.85rem;
  padding: 6px 10px; border-radius: 8px; letter-spacing: 1px;
}
.brand-text { font-weight: 700; line-height: 1.15; }
.brand-text small { display: block; font-weight: 400; color: var(--text-dim); font-size: 0.75rem; }
.nav-links { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.nav-links a { color: var(--text-dim); font-size: 0.9rem; }
.nav-links a:hover { color: var(--cyan); text-decoration: none; }
.btn-nav {
  background: linear-gradient(135deg, var(--cyan), var(--green));
  color: #04121f !important; font-weight: 700;
  padding: 7px 12px; border-radius: 8px; font-size: 0.88rem !important;
  white-space: nowrap;
}
.btn-nav:hover { filter: brightness(1.1); }
.btn-nav-outline { background: transparent; color: var(--cyan) !important; border: 1px solid var(--cyan); }
.btn-nav-outline:hover { background: rgba(34, 211, 238, 0.12); text-decoration: none; }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.6rem; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(34, 211, 238, 0.18), transparent 60%),
    radial-gradient(700px 500px at 10% 110%, rgba(52, 211, 153, 0.14), transparent 60%),
    var(--bg);
  padding: 120px 20px 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background: url("../assets/photos/hero_retro.gif") center / cover no-repeat;
  animation: kenburns 30s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1); }
  to   { transform: scale(1.12); }
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(rgba(11, 18, 32, 0.82), rgba(11, 18, 32, 0.88));
}
.hero-content { position: relative; z-index: 2; }
.hero-content { max-width: 780px; margin: 0 auto; text-align: center; }
.hero-eyebrow { color: var(--text-dim); text-transform: uppercase; letter-spacing: 2px; font-size: 0.85rem; margin-bottom: 16px; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 1.05; margin-bottom: 10px; }
.accent { background: linear-gradient(90deg, var(--cyan), var(--green)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: clamp(1.1rem, 3vw, 1.5rem); color: var(--text-dim); margin-bottom: 22px; }
.hero-desc { font-size: 1.05rem; max-width: 620px; margin: 0 auto 32px; color: var(--text); }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 20px; font-size: 0.95rem; }
.hero-note a { color: var(--cyan); font-weight: 600; border-bottom: 1px dashed var(--cyan); }
.hero-note a:hover { border-bottom-style: solid; text-decoration: none; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 10px;
  font-weight: 700; font-size: 1rem; transition: transform 0.15s, filter 0.15s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); filter: brightness(1.1); }
.btn-primary { background: linear-gradient(135deg, var(--cyan), var(--green)); color: #04121f; }
.btn-ghost { border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---------- Sections ---------- */
.section { padding: 90px 20px; }
.section-dark { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.container { max-width: 1100px; margin: 0 auto; }
.section-title { font-size: clamp(1.7rem, 4vw, 2.4rem); text-align: center; margin-bottom: 8px; }
.section-sub { text-align: center; color: var(--text-dim); margin-bottom: 40px; }
.section-note { text-align: center; color: var(--text-dim); margin-top: 26px; max-width: 700px; margin-left: auto; margin-right: auto; }

/* ---------- Grilles & cartes ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; text-align: center; }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
  transition: transform 0.2s, border-color 0.2s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(34, 211, 238, 0.5); }
.card h3 { margin-bottom: 10px; font-size: 1.15rem; }
.card p { color: var(--text-dim); }
.card-icon { font-size: 2.2rem; margin-bottom: 10px; }
.card-img { width: 100%; height: auto; object-fit: contain; border-radius: 12px; margin-bottom: 14px; border: 1px solid var(--border); background: #0a0f1e; padding: 10px; box-sizing: border-box; }
.card-list { list-style: none; margin-top: 14px; }
.card-list li { padding: 6px 0 6px 22px; position: relative; color: var(--text-dim); font-size: 0.95rem; }
.card-list li::before { content: "▸"; position: absolute; left: 0; color: var(--cyan); }

.tag { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; margin-bottom: 10px; letter-spacing: 0.5px; }
.tag-cyber { background: rgba(248, 113, 113, 0.15); color: #fca5a5; }
.tag-net { background: rgba(34, 211, 238, 0.15); color: var(--cyan); }
.tag-elec { background: rgba(52, 211, 153, 0.15); color: var(--green); }

/* ---------- Stats ---------- */
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 12px; }
.stat-num { display: block; font-size: 2rem; font-weight: 800; background: linear-gradient(90deg, var(--cyan), var(--green)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { color: var(--text-dim); font-size: 0.9rem; }

/* ---------- Séance type ---------- */
.card-seance { margin-top: 26px; }
.seance-list { list-style: none; margin-top: 12px; }
.seance-list li { display: flex; align-items: center; gap: 14px; padding: 10px 0; color: var(--text); border-bottom: 1px dashed var(--border); }
.seance-list li:last-child { border-bottom: none; }
.seance-list span {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--green)); color: #04121f;
  display: flex; align-items: center; justify-content: center; font-weight: 800;
}

/* ---------- Galerie ---------- */
.galerie-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.galerie-grid figure { margin: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.2s, border-color 0.2s; }
.galerie-grid figure:hover { transform: translateY(-4px); border-color: rgba(34, 211, 238, 0.5); }
.galerie-grid img { width: 100%; height: 160px; object-fit: cover; display: block; }
.galerie-grid figcaption { padding: 10px 14px; font-size: 0.9rem; color: var(--text-dim); text-align: center; }

/* ---------- Contact ---------- */
.contact-info h3 { margin-bottom: 12px; }
.contact-info p { color: var(--text-dim); margin-bottom: 8px; }
.logos { display: flex; gap: 20px; margin-top: 20px; align-items: center; flex-wrap: wrap; }
.logos img { height: 130px; width: auto; border-radius: 8px; background: #fff; padding: 6px; }
@media (max-width: 640px) { .logos img { height: 85px; } }
.map-frame { border: 1px solid var(--border); width: 100%; height: 250px;
  border-radius: 12px; margin: 14px 0 6px; display: block; }

/* ---------- Liens utiles ---------- */
.liens-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
a.lien-card { display: flex; gap: 14px; align-items: flex-start; color: var(--text);
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; transition: transform 0.15s, border-color 0.15s; }
a.lien-card:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--cyan); }
.lien-card .ic { font-size: 1.7rem; line-height: 1.2; }
.lien-card h3 { font-size: 1rem; margin-bottom: 3px; }
.lien-card p { color: var(--text-dim); font-size: 0.85rem; margin: 0; }
.lien-card .go { color: var(--cyan); font-weight: 700; font-size: 0.8rem; }

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 820px; margin: 0 auto; }
.faq-wrap details { background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; margin-bottom: 10px; padding: 4px 18px; }
.faq-wrap summary { cursor: pointer; font-weight: 700; color: var(--text);
  padding: 12px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-wrap summary::-webkit-details-marker { display: none; }
.faq-wrap summary::after { content: "+"; color: var(--cyan); font-size: 1.3rem; line-height: 1; }
.faq-wrap details[open] summary::after { content: "–"; }
.faq-wrap details p { color: var(--text-dim); margin: 0 0 14px; font-size: 0.95rem; }

/* ---------- Bloc 3e / QR / actu ---------- */
.actus-date { display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 1px;
  color: var(--cyan); text-transform: uppercase; margin-bottom: 6px; }
.qr-block { text-align: center; margin-top: 16px; }
.qr-block img { width: 150px; height: 150px; object-fit: contain; background: #fff;
  padding: 8px; border-radius: 12px; }
.qr-block p { font-size: 0.8rem; margin-top: 6px; color: var(--text-dim); }

/* ---------- Carrousel ---------- */
.carousel { position: relative; width: 100%; margin: 0 auto; border-radius: 0;
  overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.carousel-track { display: flex; transition: transform 0.5s ease; }
.carousel-slide { position: relative; min-width: 100%; }
.carousel-slide img { display: block; width: 100%; height: 84vh; min-height: 440px; max-height: 900px; object-fit: cover; }
.carousel-slide figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 20px 14px;
  background: linear-gradient(to top, rgba(4, 7, 14, 0.92), transparent); text-align: left;
  font-size: 0.95rem; color: var(--text); }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  background: rgba(4, 7, 14, 0.55); border: 1px solid var(--border); color: var(--text);
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer; font-size: 1.2rem; line-height: 1;
  transition: background 0.15s; }
.carousel-btn:hover { background: rgba(34, 211, 238, 0.25); }
.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }
.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.carousel-dots button { width: 10px; height: 10px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--border); transition: background 0.15s; padding: 0; }
.carousel-dots button.active { background: var(--cyan); }
@media (max-width: 640px) { .carousel-slide img { height: 52vh; min-height: 280px; } }

.lightbox { display: none; position: fixed; inset: 0; z-index: 300; align-items: center;
  justify-content: center; background: rgba(2, 4, 8, 0.94); cursor: zoom-out; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 94vw; max-height: 90vh; border-radius: 12px; cursor: default;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.7); }
.lightbox-close { position: fixed; top: 14px; right: 26px; z-index: 301; color: #fff;
  font-size: 2.2rem; line-height: 1; cursor: pointer; background: none; border: none; }
.lightbox-close:hover { color: var(--cyan); }
.lightbox-cap { position: fixed; bottom: 16px; left: 0; right: 0; text-align: center; z-index: 301;
  color: var(--text-dim); font-size: 0.95rem; padding: 0 20px; }

/* ---------- Footer ---------- */
.footer { background: #04070e; border-top: 1px solid var(--border); padding: 30px 20px; }
.footer .container { max-width: 1400px; }
.footer p { color: var(--text-dim); font-size: 0.9rem; }
.footer-row { display: flex; justify-content: space-between; align-items: center;
  gap: 12px 24px; flex-wrap: wrap; }
.footer-name { color: var(--text) !important; font-weight: 700; margin: 0; }
.footer-acad { margin: 0; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; margin: 14px 0 16px; }
.footer-links a { color: var(--cyan); font-size: 0.9rem; font-weight: 600; }
.footer-links a:hover { text-decoration: underline; }
.footer-small { margin: 0; font-size: 0.8rem !important; color: var(--text-dim); }

/* ---------- Badge nouveau TP ---------- */
.badge-new { display: inline-block; background: rgba(251, 140, 0, 0.16); color: #fbbf24;
  font-size: 0.7rem; font-weight: 700; padding: 2px 9px; border-radius: 12px; margin-left: 8px;
  vertical-align: middle; letter-spacing: 0.3px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-links {
    display: none; flex-direction: column; gap: 14px;
    position: absolute; top: 60px; left: 0; right: 0;
    background: var(--bg); padding: 20px; border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .section { padding: 64px 18px; }
}


/* Bouton Deconnexion */
.logout-btn {
  display: inline-block;
  margin-left: 10px;
  padding: 6px 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  border-radius: 20px;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.logout-btn:hover { background: #fb8c00; border-color: #fb8c00; color: #fff !important; }

/* Nom de l'utilisateur connecte */
.whoami {
  color: #cfe3ff;
  font-weight: 600;
  font-size: 13px;
  margin-right: 10px;
  vertical-align: middle;
  white-space: nowrap;
}

/* Video popup (lightbox) */
.video-launch {
  position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: pointer;
  border-radius: 12px; overflow: hidden; background: #000; aspect-ratio: 16 / 9;
  background-size: cover; background-position: center;
}
.video-launch .play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.35); color: #fff; font-size: 1rem; font-weight: 700;
  gap: 10px; transition: background 0.2s;
}
.video-launch .play .tri {
  width: 0; height: 0; border-top: 16px solid transparent; border-bottom: 16px solid transparent;
  border-left: 26px solid #fb8c00; border-radius: 4px;
}
.video-launch:hover .play { background: rgba(0, 0, 0, 0.55); }
.video-launch .badge { position: absolute; top: 10px; left: 12px; font-size: 0.8rem;
  background: rgba(0,0,0,0.6); color: #fff; padding: 4px 10px; border-radius: 20px; }
.video-modal { position: fixed; inset: 0; z-index: 9999; background: rgba(2, 6, 16, 0.92);
  display: none; align-items: center; justify-content: center; padding: 20px; }
.video-modal.open { display: flex; }
.video-modal-box { position: relative; width: min(1000px, 96vw); }
.video-modal-close { position: absolute; top: -44px; right: 0; background: none; border: 0;
  color: #fff; font-size: 30px; cursor: pointer; line-height: 1; padding: 4px 10px; }
.video-modal-close:hover { color: #fb8c00; }
.video-modal-frame { position: relative; width: 100%; padding-top: 56.25%; background: #000;
  border-radius: 12px; overflow: hidden; }
.video-modal-frame iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* Lien Blog dans la navbar */
.nav-links a.nav-blog {
  font-weight: 800;
  color: #fbbf24 !important;
  border: 1.5px solid rgba(251, 191, 36, 0.65);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.9rem;
}
.nav-links a.nav-blog:hover { background: #fbbf24; color: #04070e !important; }

/* Boutons Espace eleves / Espace profs empiles (menu du haut) */
.nav-btns { display: flex; flex-direction: column; gap: 5px; }
.nav-btns .btn-nav { margin: 0; text-align: center; padding: 5px 12px; }

/* Hero Images */
.hero-images {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
}
.hero-image {
  flex: 1;
  max-width: 300px;
}
.hero-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 30px;
}
.gallery img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.gallery img:hover {
  transform: translateY(-4px);
}
