:root{
  --bg:#f4f6f9;
  --panel:#ffffff;
  --panel2:#eef1f6;
  --text:#0b1a2e;
  --muted:#4a5a70;
  --line:#dbe2ea;

  --brand:#0b2c54;
  --brand-light:#1e4a86;

  --shadow:0 6px 18px rgba(0,0,0,.06);
  --radius:10px;
  --max:1180px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
}

a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
.container{max-width:var(--max);margin:0 auto;padding:0 20px}

.section{padding:50px 0}
.section--alt{background:var(--panel2)}
.section__head h1,.section__head h2{margin:0 0 8px}
.section__head p{margin:0;color:var(--muted)}

.muted{color:var(--muted)}
.small{font-size:.9rem}

/* HEADER */
.site-header{
  position:sticky;
  top:0;
  z-index:50;
  background:var(--brand);
  color:#fff;
  border-bottom:3px solid var(--brand-light);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
  padding:12px 24px;
}

.brand{display:flex;align-items:center;gap:12px;min-width:220px}
.brand__logo{height:42px;width:auto}
.brand__text{display:flex;flex-direction:column;line-height:1.1}
.brand__title{font-weight:800;letter-spacing:.4px;color:#fff}
.brand__subtitle{color:#cbd5e1;font-size:.9rem}

.nav{display:flex;gap:14px;align-items:center}
.nav__link{
  color:#cbd5e1;
  font-weight:600;
  padding:8px 12px;
  border-radius:6px;
}
.nav__link:hover{background:rgba(255,255,255,.08);color:#fff}
.nav__link.active{background:#fff;color:var(--brand)}

.nav-toggle{
  display:none;
  background:none;
  border:0;
  cursor:pointer;
  width:42px;height:42px;
  border-radius:8px;
}
.nav-toggle span{
  display:block;
  height:2px;
  width:22px;
  margin:5px auto;
  background:#fff;
  border-radius:99px;
}

/* HERO */
.hero{
  padding:55px 0 30px;
  background:linear-gradient(180deg,#ffffff 0%, #f4f6f9 100%);
}

.hero__grid{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:20px;
  align-items:start;
}

.badge{
  background:#e2e8f0;
  padding:6px 12px;
  border-radius:999px;
  font-size:.85rem;
  display:inline-block;
  margin-bottom:10px;
}

.hero h1{
  font-size:2rem;
  font-weight:800;
  color:var(--brand);
  margin:0 0 12px;
}

.lead{color:var(--muted);line-height:1.55;margin:0 0 16px}
.hero__cta{display:flex;gap:10px;flex-wrap:wrap;margin-top:6px}

/* BUTTONS */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:10px 18px;
  border-radius:6px;
  font-weight:700;
  border:1px solid transparent;
  cursor:pointer;
  -webkit-user-select:none;
  user-select:none;
}
.btn--primary{
  background:var(--brand);
  color:#fff;
}
.btn--primary:hover{background:var(--brand-light)}
.btn--ghost{
  background:#e2e8f0;
  color:#0b1a2e;
}
.btn--ghost:hover{background:#d9e2ef}
.btn--danger{
  background:#dc2626;
  color:#fff;
}
.btn--danger:hover{background:#b91c1c}
.btn--small{padding:8px 12px;font-size:.9rem}

/* GRID */
.grid{display:grid;gap:20px}
.grid--2{grid-template-columns:1fr 1fr}
.grid--3{grid-template-columns:repeat(3,1fr)}

/* CARDS */
.card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:20px;
  box-shadow:var(--shadow);
}

/* ROWS */
.row-between{display:flex;align-items:center;justify-content:space-between;gap:12px}

/* STATS */
.stats{display:flex;gap:14px;flex-wrap:wrap;margin-top:18px}
.stat{
  background:#fff;
  padding:12px 16px;
  border-radius:8px;
  border:1px solid var(--line);
  min-width:120px;
}
.stat__value{font-weight:900;font-size:1.35rem;color:var(--brand)}
.stat__label{font-size:.85rem;color:var(--muted)}

/* ====== CAROUSEL (répare la gestion des images comme ta version) ====== */
.card.carousel{
  padding:0;
  overflow:hidden;
}

.carousel__viewport{
  position:relative;
  width:100%;
  height:320px;
  overflow:hidden;
  background:#0b2c54;
}

.carousel__img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:0;
  transition:opacity .35s ease;
}

.carousel__img.is-active{opacity:1}

.carousel__controls{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border-top:1px solid var(--line);
  background:#fff;
}

.icon-btn{
  width:38px;height:38px;
  border-radius:8px;
  border:1px solid var(--line);
  background:#fff;
  cursor:pointer;
  font-size:18px;
  display:grid;
  place-items:center;
}
.icon-btn:hover{background:#f1f5f9}

.carousel__dots{
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:center;
  flex:1;
}
.dot{
  width:10px;height:10px;
  border-radius:999px;
  border:1px solid #94a3b8;
  background:#e2e8f0;
  cursor:pointer;
  padding:0;
}
.dot.is-active{
  background:var(--brand);
  border-color:var(--brand);
}

/* LIST */
.list{display:flex;flex-direction:column;gap:12px}
.list-item{
  padding:12px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
}
.list-item__title{font-weight:800}
.list-item__meta{color:var(--muted);font-size:.9rem}

/* FILTERS */
.filters{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin:14px 0 18px;
}
.filters input,.filters select{flex:1;min-width:220px}

/* FORM */
.form{display:flex;flex-direction:column;gap:12px}
.form__row{display:flex;flex-direction:column;gap:6px}
.form__error{color:#b91c1c;min-height:1em;font-size:.85rem}

input,select,textarea{
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:6px;
  font-family:inherit;
  background:#fff;
}
input:focus,select:focus,textarea:focus{
  outline:none;
  border-color:var(--brand);
  box-shadow:0 0 0 3px rgba(11,44,84,.12);
}

.checkbox{display:flex;gap:10px;align-items:flex-start}
.checkbox input{margin-top:4px}

/* TABS */
.tabs{padding:0;overflow:hidden}
.tabs__nav{
  display:flex;
  gap:0;
  border-bottom:1px solid var(--line);
  background:#f8fafc;
}
.tabs__btn{
  flex:1;
  padding:12px 14px;
  border:0;
  background:transparent;
  cursor:pointer;
  font-weight:800;
  color:#334155;
}
.tabs__btn.is-active{
  background:#fff;
  color:var(--brand);
  border-bottom:2px solid var(--brand);
}
.tabs__panels{padding:18px}
.tabs__panel{display:none}
.tabs__panel.is-active{display:block}

.checklist{margin:10px 0 12px;padding-left:18px}
.checklist li{margin:6px 0}

/* TAGS / PILLS */
.pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#fff;
  font-weight:700;
  font-size:.85rem;
}
.tags{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.tag{
  padding:6px 10px;
  border-radius:999px;
  background:#e2e8f0;
  font-weight:700;
  font-size:.8rem;
}

/* PERSON (équipe) */
.avatar{
  width:44px;height:44px;
  border-radius:10px;
  background:#0b2c5412;
  border:1px solid var(--line);
  display:grid;
  place-items:center;
  font-weight:900;
  color:var(--brand);
}

/* ABOUT IMAGES */
.about-img{
  width:100%;
  height:200px;
  object-fit:cover;
  border-radius:10px;
  border:1px solid var(--line);
  margin:10px 0 14px;
}

/* DIVIDER/CALLOUT */
.divider{height:1px;background:var(--line);margin:14px 0}
.callout{
  border:1px solid var(--line);
  background:#f8fafc;
  padding:12px;
  border-radius:10px;
}

/* EMPTY */
.empty{
  border:1px dashed #94a3b8;
  background:#f8fafc;
  padding:16px;
  border-radius:10px;
}

/* TEAM SECTION BACKGROUND (chemin corrigé) */
.team-section{
  background:
    linear-gradient(rgba(255,255,255,.94),rgba(255,255,255,.94)),
    url("../img/efrei-campus.jpg");
  background-size:cover;
  background-position:center;
}

/* FOOTER */
.footer{
  margin-top:40px;
  padding:20px 0;
  background:var(--brand);
  color:#fff;
}
.footer__grid{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

/* RESPONSIVE */
@media(max-width:980px){
  .hero__grid{grid-template-columns:1fr}
  .carousel__viewport{height:300px}
}

@media(max-width:900px){
  .grid--3{grid-template-columns:1fr 1fr}
}

@media(max-width:700px){
  .grid--2,.grid--3{grid-template-columns:1fr}
  .nav{
    display:none;
    flex-direction:column;
    background:var(--brand);
    position:absolute;
    top:70px;
    right:12px;
    left:12px;
    padding:12px;
    border-radius:10px;
    border:1px solid rgba(255,255,255,.18);
  }
  .nav.is-open{display:flex}
  .nav-toggle{display:block}
  .site-header{position:sticky}
}
.team-hero{
  height:320px;
  background:url("../img/team-background.jpg") center/cover no-repeat;
  position:relative;
  display:flex;
  align-items:center;
}

.team-hero__overlay{
  background:rgba(11,44,84,.75);
  width:100%;
  padding:40px 0;
  color:white;
}

.team-hero h1{
  margin:0 0 10px;
  font-size:2rem;
  font-weight:800;
}
.page-hero{
  height:280px;
  position:relative;
  display:flex;
  align-items:center;
  background-size:cover;
  background-position:center;
}

.page-hero__overlay{
  background:rgba(11,44,84,.78);
  width:100%;
  padding:40px 0;
  color:white;
}

.page-hero h1{
  margin:0 0 10px;
  font-size:2rem;
  font-weight:800;
}

.page-hero p{
  margin:0;
  font-size:1rem;
  opacity:.95;
}

/* SPECIFIC BACKGROUNDS */

.hero-home{
  background:url("../img/efrei-campus.jpg") center/cover no-repeat;
}

.hero-formations{
  background:url("../img/efrei-innovation.jpg") center/cover no-repeat;
}

.hero-contact{
  background:url("../img/efrei-campus.jpg") center/cover no-repeat;
}