/* Custom styles for University website */

/* General styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/hero-bg.jpg') no-repeat center center;
    background-size: cover;
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* width: 100%;
    padding: 0; */
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* Cards */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Faculty cards */
.faculty-card img {
    height: 250px;
    object-fit: cover;
}

/* Programs */
.program-card {
    border-left: 4px solid #0d6efd;
}

/* Footer */
footer {
    background-color: #f8f9fa;
    padding: 2rem 0;
}

/* Buttons */
.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* Navigation styles */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
    color: #000 !important;
}


.navbar-nav .nav-link:hover {
    color: #f07f12!important;
    
}

.dropdown-menu {
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Footer styles */
footer {
    background-color: #1a1a1a !important;
}

footer h5 {
    border-bottom: 2px solid #0d6efd;
    padding-bottom: 10px;
    margin-bottom: 20px;
    display: inline-block;
}

footer ul li {
    margin-bottom: 10px;
}

footer a:hover {
    color: #0d6efd !important;
}

.social-icons a {
    transition: opacity 0.3s ease;
}

.social-icons a:hover {
    opacity: 0.7;
}


/* selecteur de langue  */
/* === Sélecteur de langue flottant : propre & responsive === */
.language-selector{
    position: fixed;
    right: 12px;
    bottom: 16px;
    z-index: 1060;                 /* au-dessus de .dropdown (1000) et navbar; < modal (1055/1065 selon thèmes), mais OK */
    box-sizing: border-box;
    padding: 6px;
    border-radius: 12px;
    background-color: #008d36;
    box-shadow: 0 8px 22px rgba(0,0,0,.22);
    max-width: min(280px, 92vw);
    width: max-content;
    overflow: visible;
  }
  
  .language-selector .btn{
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: 14px;
    line-height: 1;
    padding: .55rem .7rem;
    color: #fff;
    background: transparent;
    border: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  /* Règle cruciale : le menu doit passer devant tout */
  .language-selector .dropdown-menu{
    min-width: 12rem;
    max-width: 90vw;
    max-height: 50vh;
    overflow: auto;
    z-index: 1080;                 /* au-dessus de la bulle elle-même */
  }
  
  .language-selector .btn:hover{ background: rgba(255,255,255,.12); color: #fff; }
  
  /* Petits écrans */
  @media (max-width: 576px){
    .language-selector{ right: 8px; bottom: 12px; padding: 5px; border-radius: 10px; max-width: min(240px, 94vw); }
    .language-selector .btn{ font-size: 13px; padding: .5rem .6rem; }
  }
  
  /* RTL: coller à gauche automatiquement */
  html[dir="rtl"] .language-selector{ left: 12px; right: auto; }
  @media (max-width: 576px){
    html[dir="rtl"] .language-selector{ left: 8px; }
  }
  
  /* Dark mode */
  [data-theme="dark"] .language-selector{ background-color: #303a4b; box-shadow: 0 10px 28px rgba(0,0,0,.35); }
  [data-theme="dark"] .language-selector .btn{ color: #f1f5f9; }
  
  /* Masque pendant offcanvas ouvert (si :has non supporté, fallback JS ajoute .is-hidden) */
  body:has(.offcanvas.show) .language-selector{ opacity: 0; pointer-events: none; transition: opacity .15s ease; }
  .language-selector.is-hidden{ opacity: 0; pointer-events: none; }
  


/* Fin selecteur de langues  */


/* Responsive adjustments */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    .hero-section .col-lg-6:last-child {
        margin-top: 2rem;
    }
}

[data-theme="dark"] body { background:#0b0f14; color:#e9eef5; }
[data-theme="dark"] .navbar.bg-light { background:#131923 !important; }
[data-theme="dark"] .dropdown-menu { background:#121825; color:#e9eef5; }




/* ===== Quick Launch (menu flottant haut-gauche) ===== */
.quick-launch{
    position: fixed;
    left: max(12px, env(safe-area-inset-left, 12px));
    top: calc(var(--ql-top, 88px) + env(safe-area-inset-top, 0px));
    z-index: 1030; /* sous l'offcanvas (1045), au-dessus du contenu */
    pointer-events: none; /* évite de bloquer les clics derrière, sauf sur boutons */
    /* background-color: #0a58ca; */
  }
  
  .quick-launch__list{
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin: 0;
    padding: .5rem;
    list-style: none;
    background: rgba(236, 236, 236, 0.747);
    backdrop-filter: saturate(120%) blur(6px);
    border: 2px solid rgba(0,0,0,.9);
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0,0,0,.08);
    pointer-events: auto;
  }
  
  .btn-ql{
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 0;
    text-decoration: none;
    background: #008d36;
    color: #fff;
    box-shadow: 0 2px 8px rgba(80, 80, 80, 0.35);
    transition: filter .15s ease, box-shadow .15s ease, transform .05s ease;
    pointer-events: auto;
  }
  .btn-ql i{ font-size: 1.2rem; line-height: 1; }
  .btn-ql:hover,
  .btn-ql:focus{
    filter: brightness(1.05);
    box-shadow: 0 4px 12px rgba(13,110,253,.45);
    outline: none;
  }
  
  /* FAB mobile */
  .quick-launch__fab{ pointer-events: auto; }
  .btn-ql--fab{
    border-radius: 999px;
    width: 48px;
    height: 48px;
  }
  .quick-launch .dropdown-menu{
    z-index: 1056; /* au-dessus de la navbar */
    min-width: 12rem;
  }
  
  /* XS : réduit légèrement */
  @media (max-width: 576px){
    .quick-launch{ --ql-top: 70px; } /* sous la navbar sur mobile */
    .quick-launch__list{ padding: .35rem; border-radius: 14px; gap: .35rem; }
    .btn-ql{ width: 40px; height: 40px; border-radius: 10px; }
    .btn-ql--fab{ width: 48px; height: 48px; }
    .btn-ql{
border: solid 1px #fff;
      }
  }
  
  /* Thème sombre */
  [data-theme="dark"] .quick-launch__list{
    background: rgba(19,25,35,.88);
    border-color: rgba(255,255,255,.06);
    box-shadow: 0 8px 24px rgba(0,0,0,.5);
  }
  [data-theme="dark"] .btn-ql{
    background: #2563eb;
    color: #f8fafc;
    box-shadow: 0 2px 8px rgba(37,99,235,.45);
  }
  [data-theme="dark"] .btn-ql:hover,
  [data-theme="dark"] .btn-ql:focus{ filter: brightness(1.08); }
  
  /* Masqué quand l’offcanvas est ouvert (si :has() dispo) */
  body:has(.offcanvas.show) .quick-launch{
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
  }
  /* Fallback piloté par JS */
  .quick-launch.is-hidden{
    opacity: 0;
    pointer-events: none;
  }
  

  /* === HERO RECHERCHE (full width avec image + overlay) === */
.ix-search-band{
    --ix-hero-img: url('/static/images/ix-search-hero.png')
    position: relative;
    padding: clamp(32px, 6vw, 80px) 0;
    color: #fff;
    background:
      linear-gradient(135deg, rgba(240,127,18,0.90), rgba(0,141,54,.92)),
      var(--ix-hero-img);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 0;
    overflow: hidden;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    border-bottom-right-radius: 20px ;
    border-bottom-left-radius: 20px ;
  }
  
  /* petit voile décoratif pour de la profondeur */
  .ix-search-band::after{
    content:"";
    position:absolute; inset:0;
    background:
      radial-gradient(80% 60% at 15% -10%, rgba(255,255,255,.18) 0%, transparent 60%),
      radial-gradient(70% 50% at 85% 120%, rgba(255,255,255,.12) 0%, transparent 60%);
    pointer-events:none;
  }
  
  .ix-search-band__title{
    color:#fff;
    font-weight:800;
    letter-spacing:.3px;
    text-shadow: 0 2px 10px rgba(0,0,0,.25);
    margin-bottom:.25rem;
  }
  .ix-search-band__subtitle{
    color:rgba(255,255,255,.95);
  }
  
  /* champs & bouton: lisibles sur fond visuel */
  .ix-search-band__form .ix-field{
    background-color: rgba(255,255,255,.98);
    border:0;
    box-shadow: 0 8px 24px rgba(0,0,0,.06);
  }
  .ix-search-band__form .input-group-text.ix-field{
    background-color: rgba(255,255,255,.92);
    border:0;
  }
  
  .ix-btn-ghost{
    background: rgba(255,255,255,.10);
    color:#fff;
    border:1px solid rgba(255,255,255,.55);
  }
  .ix-btn-ghost:hover{
    background: rgba(255,255,255,.20);
    color:#fff;
  }
  
  /* chips rapides */
  .ix-quick__label{ color:#fff; opacity:.9; }
  .ix-chip{
    display:inline-block;
    padding:.35rem .6rem;
    border-radius:999px;
    font-size:.9rem;
    background: rgba(255,255,255,.16);
    border:1px solid rgba(255,255,255,.28);
    color:#fff;
    text-decoration:none;
    transition:all .2s ease;
    backdrop-filter: blur(2px);
  }
  .ix-chip:hover{ background: rgba(255,255,255,.26); color:#fff; }
  
  /* responsive doux */
  @media (max-width: 576px){
    .ix-search-band{ padding: 28px 0; width: 95%; 
      border-bottom-right-radius: 10px ;
      border-bottom-left-radius: 10px ;
    }
    .ix-search-band__title{ font-size: clamp(1.25rem, 6vw, 1.8rem); }
    .ix-search-band__subtitle{ font-size: .95rem; }
  }
  
  /* Dark mode: champs sombres mais lisibles */
  [data-theme="dark"] .ix-search-band__form .ix-field{
    background-color: rgba(17,24,39,.92); /* slate-900 */
    color:#e9eef5;
    border:1px solid rgba(255,255,255,.08);
  }
  [data-theme="dark"] .ix-search-band__form .form-control::placeholder{
    color: rgba(255,255,255,.6);
  }
  [data-theme="dark"] .ix-btn-ghost{
    border-color: rgba(255,255,255,.45);
  }

  
  /* carrousel  */
  /* ===== Offcanvas Informations + Carousel ===== */
.offcanvas-info{
    width: min(680px, 96vw);
    border-right: 0;
    background: #12200b; /* fond sombre propre */
    color: #e6edf7;
  }
  .offcanvas-info .offcanvas-header{
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .offcanvas-info .btn-close{
    filter: invert(1) grayscale(100%); /* close blanche */
  }
  
  .info-slide{
    position: relative;
    min-height: 62vh;
    display: grid;
    align-content: center;
    justify-items: start;
    gap: .75rem;
    padding: clamp(1rem, 3vw, 1.75rem);
    border-radius: .75rem;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  }
  
  /* styles texte */
  .info-slide__icon{
    font-size: 2.25rem;
    line-height: 1;
    opacity: .95;
    margin-bottom: .25rem;
  }
  .info-slide__title{
    font-weight: 800;
    letter-spacing: .2px;
    margin: 0 0 .25rem 0;
  }
  .info-slide__text{
    color: #cbd5e1;
    margin: 0 0 .75rem 0;
    max-width: 52ch;
  }
  
  /* lignes de CTA avec 2 boutons */
  .ix-cta-row{
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
  }
  .ix-cta-row .btn{
    border-radius: .75rem;
  }
  
  /* dégradés par slide */
  .info-slide--admissions{
    background:
      radial-gradient(120% 70% at -10% -20%, rgba(13,110,253,.25) 0%, transparent 60%),
      radial-gradient(120% 80% at 120% 120%, rgba(0,184,132,.25) 0%, transparent 60%),
      linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.00));
  }
  .info-slide--calendar{
    background:
      radial-gradient(120% 70% at 0% 0%, rgba(255,193,7,.23) 0%, transparent 60%),
      radial-gradient(120% 80% at 120% 120%, rgba(13,110,253,.22) 0%, transparent 60%),
      linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.00));
  }
  .info-slide--bourses{
    background:
      radial-gradient(120% 70% at -10% -10%, rgba(25,135,84,.28) 0%, transparent 60%),
      radial-gradient(120% 70% at 120% 120%, rgba(111,66,193,.22) 0%, transparent 60%),
      linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.00));
  }
  .info-slide--campus{
    background:
      radial-gradient(110% 70% at 0% 0%, rgba(220,53,69,.22) 0%, transparent 60%),
      radial-gradient(120% 70% at 120% 120%, rgba(13,202,240,.22) 0%, transparent 60%),
      linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.00));
  }
  
  /* indicators un peu plus visibles en sombre */
  .offcanvas-info .carousel-indicators [data-bs-target]{
    background-color: #94a3b8;
  }
  .offcanvas-info .carousel-indicators .active{
    background-color: #fff;
  }
  
  /* responsive */
  @media (max-width: 576px){
    .offcanvas-info{ width: 100vw; }
    .info-slide{ min-height: 58vh; }
  }
  
  /* Dark mode: déjà sombre, on garde */
  [data-theme="dark"] .offcanvas-info{ background:#0b1220; color:#e6edf7; }

  /* --- Zone media & image : occupe 100% et masque le débord --- */
.offcanvas-info .info-slide__media{
    position: relative;
    overflow: hidden;
  }
  
  /* L’image prend 100% de la largeur, pas de crop agressif */
  .offcanvas-info .info-slide__img{
    display:block;
    width:100%;
    height:auto;
    max-height:50vh;                /* ajuste si tu veux plus haut */
    object-fit:contain;
    transform-origin:center center; /* zoom depuis le centre */
    will-change: transform;
    transition: transform 0.06s linear; /* lissage si le raf saute un frame */
    cursor: zoom-in;
  }
  
  /* états visuels */
  .offcanvas-info .info-slide__img.is-zooming{ cursor: zoom-out; }
  .offcanvas-info .info-slide__overlay{ pointer-events:none; }
  
  

  /* ===== ÉVÉNEMENTS (slider) ===== */
.ix-events{ padding: clamp(24px,4vw,48px) 0; background:#f8fafc; }
.ix-slider-viewport{ width:100%; overflow:hidden; }
.ix-slider{
  display:flex; gap:clamp(12px,2vw,20px);
  padding: clamp(12px,2vw,20px) clamp(16px,4vw,48px);
  overflow-x:auto; scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling: touch;
}
.ix-event-card{
  position:relative; scroll-snap-align:start;
  flex: 0 0 clamp(260px, 28vw, 380px);
  background:#fff; border-radius:18px; overflow:hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,.06);
  transition: transform .2s ease, box-shadow .2s ease;
}
.ix-event-card:hover{ transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0,0,0,.09); }
.ix-card-media{
  width:100%; aspect-ratio: 16/9;
  background-image: var(--img);
  background-size: cover; background-position: center; background-repeat:no-repeat;
}
.ix-card-media--placeholder{
  background: radial-gradient(1200px 300px at 10% 0%, #e9f5ff, #e9fff7);
  display:flex; align-items:center; justify-content:center;
}
.ix-card-media--placeholder::after{
  content:""; width:72px; height:72px; border-radius:50%;
  background: conic-gradient(from 0deg, #0d6efd, #00b884);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72'%3E%3Cpath d='M36 6l22 14-22 14-22-14zM14 36l22 14 22-14v14L36 64 14 50z' fill='%23000'/%3E%3C/svg%3E") center/60% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72'%3E%3Cpath d='M36 6l22 14-22 14-22-14zM14 36l22 14 22-14v14L36 64 14 50z' fill='%23000'/%3E%3C/svg%3E") center/60% no-repeat;
}
.ix-card-body{ padding: 14px 16px 16px 16px; }
.ix-badge{
  display:inline-flex; align-items:center; gap:.35rem;
  font-size:.765rem; padding:.25rem .55rem; border-radius:999px; color:#fff;
}
.ix-badge--primary{ background:#0d6efd; }
.ix-badge--green{ background:#00b884; }
.ix-badge--blue{ background:#3399ff; }
.ix-badge--orange{ background:#ff8a00; }
.ix-slider-nav{ border-radius:999px; }

/* ===== NANO-SATELLITE ===== */
.ix-nanosat{
  position:relative;
  padding: clamp(36px,5vw,72px) 0;
  background: radial-gradient(1200px 300px at 10% 0%, #0b1630, #06101b);
  color:#fff;
}
.ix-eyebrow{
  font-size:.85rem; letter-spacing:.08em; text-transform:uppercase;
  color:#9ed2ff; background: rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12); padding:.25rem .5rem; border-radius:999px;
}
.ix-chip{
  display:inline-flex; align-items:center; gap:.45rem; padding:.35rem .6rem;
  border-radius:999px; font-size:.85rem; font-weight:600;
}
.ix-chip--glass{
  color:#e9f3ff; background: rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(6px);
}
.ix-ns-gallery{
  display:grid; gap: clamp(8px,2vw,14px);
  grid-template-columns: 1fr 1fr; grid-auto-rows: 160px;
}
@media (min-width: 992px){
  .ix-ns-gallery{ grid-template-columns: 1.2fr .8fr; grid-auto-rows: 180px; }
}
.ix-ns-img{
  background-image: var(--img); background-size: cover; background-position:center;
  border-radius:18px; box-shadow: 0 14px 30px rgba(0,0,0,.25); min-height: 160px;
}
.ix-ns-gallery .ix-ns-img:nth-child(1){ grid-column: 1 / 3; min-height: 220px; }
@media (min-width: 992px){
  .ix-ns-gallery .ix-ns-img:nth-child(1){ grid-column: 1 / 2; grid-row: 1 / 3; min-height: 100%; }
}

/* ===== RECHERCHE (grille) ===== */
.ix-research{ padding: clamp(28px,4vw,56px) 0; }
.ix-r-card{
  background:#fff; border-radius:16px; overflow:hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,.06); border:1px solid rgba(0,0,0,.04);
  transition: transform .2s ease, box-shadow .2s ease;
}
.ix-r-card:hover{ transform: translateY(-2px); box-shadow: 0 16px 32px rgba(0,0,0,.09); }
.ix-r-media{
  width:100%; aspect-ratio: 16/10; background-image: var(--img);
  background-size: cover; background-position:center; background-repeat:no-repeat;
}
.ix-avatar{
  width:32px; height:32px; border-radius:50%; background:#0d6efd; color:#fff;
  display:inline-flex; align-items:center; justify-content:center; font-size:.8rem; font-weight:700;
}

/* Dark mode tweaks */
[data-theme="dark"] .ix-events{ background:#0b1220; }
[data-theme="dark"] .ix-event-card{ background:#0f172a; border-color:rgba(255,255,255,.06); }
[data-theme="dark"] .ix-research{ background:#0b1220; }
[data-theme="dark"] .ix-r-card{ background:#0f172a; border-color:rgba(255,255,255,.06); }
