*{box-sizing:border-box}
:root{
  --bg:#020617;
  --header:#020617e6;
  --gold:#fbbf24;
  --gold-soft:rgba(251,191,36,.18);
  --text:#fff;
  --muted:rgba(255,255,255,.75);
  --border:rgba(255,255,255,.14);
  --card:rgba(255,255,255,.05);
}
html,body{min-height:100%}
body{
  margin:0;
  font-family:Segoe UI,Tahoma,Arial,sans-serif;
  background:
    radial-gradient(circle at 18% 12%,rgba(245,158,11,.22),transparent 28%),
    radial-gradient(circle at 80% 16%,rgba(37,99,235,.25),transparent 30%),
    linear-gradient(135deg,#020617 0%,#0f172a 54%,#111827 100%);
  color:var(--text);
}

.institutional-carousel{
  position:relative;
  width:100%;
  overflow:hidden;
  background:#010611;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.carousel-viewport{
  position:relative;
  width:100%;
  overflow:hidden;
}
.carousel-track{
  display:flex;
  width:100%;
  direction:ltr;
  transform:translateX(0);
  transition:transform .7s cubic-bezier(.22,.61,.36,1);
  will-change:transform;
}
.carousel-slide{
  flex:0 0 100%;
  min-width:100%;
  aspect-ratio:2048 / 882;
  overflow:hidden;
  line-height:0;
  direction:ltr;
}
.carousel-slide img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}
.carousel-arrow{
  position:absolute;
  top:50%;
  z-index:3;
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  padding:0;
  border:1px solid rgba(255,255,255,.28);
  border-radius:50%;
  background:rgba(2,6,23,.56);
  color:#fff;
  font:700 2rem/1 Arial,sans-serif;
  cursor:pointer;
  transform:translateY(-50%);
  box-shadow:0 8px 24px rgba(0,0,0,.28);
  backdrop-filter:blur(8px);
  transition:background .18s ease,transform .18s ease,opacity .18s ease;
}
.carousel-arrow:hover{
  background:rgba(2,6,23,.82);
  transform:translateY(-50%) scale(1.05);
}
.carousel-prev{left:18px}
.carousel-next{right:18px}
.carousel-dots{
  position:absolute;
  left:50%;
  bottom:10px;
  z-index:3;
  display:none;
  align-items:center;
  justify-content:center;
  gap:8px;
  transform:translateX(-50%);
  padding:6px 10px;
  border-radius:999px;
  background:rgba(2,6,23,.42);
  backdrop-filter:blur(8px);
}
.carousel-dot{
  width:9px;
  height:9px;
  padding:0;
  border:0;
  border-radius:50%;
  background:rgba(255,255,255,.5);
  cursor:pointer;
  transition:width .18s ease,background .18s ease,border-radius .18s ease;
}
.carousel-dot.active{
  width:24px;
  border-radius:999px;
  background:var(--gold);
}
@media(prefers-reduced-motion:reduce){
  .carousel-track{transition:none}
}

.site-header{
  padding:14px clamp(14px,2.5vw,24px);
  background:var(--header);
  border-top:0;
  border-bottom:1px solid var(--border);
  position:sticky;
  top:0;
  z-index:20;
  backdrop-filter:blur(12px);
}

.menu-bar{
  display:grid;
  grid-template-columns:repeat(9,minmax(0,1fr));
  gap:10px;
  width:100%;
  align-items:stretch;
}

.menu-btn{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:96px;
  padding:14px 10px 12px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:18px;
  background:
    linear-gradient(180deg,rgba(255,255,255,.10),rgba(255,255,255,.04));
  color:#fff;
  text-decoration:none;
  text-align:center;
  box-shadow:0 10px 30px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.06);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
  overflow:hidden;
}
.menu-btn::before{
  content:"";
  position:absolute;
  inset:0 auto auto 0;
  width:100%;
  height:3px;
  background:linear-gradient(90deg,transparent,rgba(251,191,36,.9),transparent);
  opacity:.65;
}
.menu-btn:hover{
  transform:translateY(-2px);
  border-color:rgba(251,191,36,.38);
  background:linear-gradient(180deg,rgba(251,191,36,.18),rgba(255,255,255,.06));
  box-shadow:0 16px 36px rgba(0,0,0,.25), 0 0 0 1px rgba(251,191,36,.08) inset;
}
.menu-icon{
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  border-radius:50%;
  font-size:1.25rem;
  line-height:1;
  background:radial-gradient(circle at 30% 30%,rgba(255,255,255,.22),rgba(255,255,255,.08));
  border:1px solid rgba(255,255,255,.12);
  box-shadow:0 8px 18px rgba(0,0,0,.18);
}
.menu-label{
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  line-height:1.18;
  min-height:2.36em;
  font-weight:800;
  font-size:.94rem;
  letter-spacing:.1px;
}
[dir="rtl"] .menu-btn{direction:rtl}
[dir="ltr"] .menu-btn{direction:ltr}

.page{width:96vw;max-width:none;margin:18px auto;transition:width .2s ease,max-width .2s ease}
.page.article-page{
  width:calc(100% - 32px);
  max-width:1360px;
  margin-left:auto;
  margin-right:auto;
}
.hero{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:20px;
  margin-bottom:16px;
}
.hero h1{margin:0;font-size:clamp(1.45rem,3vw,2.35rem);line-height:1.08}
.actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.lang-buttons{display:flex;gap:10px;flex-wrap:wrap}
.lang,.fullscreen-btn{
  border:1px solid rgba(255,255,255,.24);
  border-radius:999px;
  padding:11px 17px;
  background:rgba(255,255,255,.1);
  color:#fff;
  font-weight:850;
  cursor:pointer;
}
.lang:hover,.fullscreen-btn:hover{background:rgba(255,255,255,.18)}
.lang.active{background:var(--gold);color:#111827;border-color:var(--gold)}
.fullscreen-btn{
  background:#2563eb;
  border-color:#2563eb;
  box-shadow:0 12px 30px rgba(37,99,235,.25);
}
.fullscreen-btn:hover{background:#1d4ed8}
.viewer{
  height:calc(100vh - 180px);
  min-height:560px;
  border-radius:28px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 24px 70px rgba(0,0,0,.35);
  border:1px solid var(--border);
}
.viewer iframe{width:100%;height:100%;border:0;display:block;background:#fff}
.viewer:fullscreen{border-radius:0;border:0;width:100vw;height:100vh}
.viewer:fullscreen iframe{height:100vh}

@media(max-width:1360px){
  .menu-bar{grid-template-columns:repeat(4,minmax(0,1fr));}
}
@media(max-width:980px){
  .menu-bar{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media(max-width:760px){
  .carousel-arrow{
    width:36px;
    height:36px;
    font-size:1.65rem;
  }
  .carousel-prev{left:8px}
  .carousel-next{right:8px}
  .carousel-dots{bottom:6px;padding:5px 8px}
  .site-header{
    padding:10px 12px;
    overflow:hidden;
  }
  .menu-bar{
    display:grid;
    grid-template-columns:none;
    grid-auto-flow:column;
    grid-auto-columns:186px;
    gap:12px;
    width:100%;
    overflow-x:auto;
    overflow-y:hidden;
    padding:1px 1px 8px;
    scroll-snap-type:x proximity;
    overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:thin;
  }
  .menu-bar::-webkit-scrollbar{height:6px}
  .menu-bar::-webkit-scrollbar-track{background:transparent}
  .menu-bar::-webkit-scrollbar-thumb{
    background:rgba(255,255,255,.24);
    border-radius:999px;
  }
  .menu-btn{
    width:186px;
    min-width:186px;
    min-height:92px;
    padding:12px 10px;
    border-radius:16px;
    scroll-snap-align:start;
  }
  .menu-label{font-size:.95rem}
  .hero{align-items:center;flex-direction:column}
  .actions{justify-content:flex-start}
  .viewer{height:72vh;min-height:460px;border-radius:18px}
}
@media(max-width:460px){
  .page{width:calc(100vw - 10px);max-width:none;margin:12px auto}
  .page.article-page{width:calc(100vw - 18px);max-width:1360px}
  .menu-bar{grid-auto-columns:172px}
  .menu-btn{width:172px;min-width:172px}
}


.menu-btn.active-page{
  border-color:rgba(251,191,36,.72);
  background:linear-gradient(180deg,rgba(251,191,36,.24),rgba(255,255,255,.07));
  box-shadow:0 16px 38px rgba(0,0,0,.27),0 0 0 1px rgba(251,191,36,.16) inset;
}
.menu-btn.active-page::before{opacity:1}

.menu-btn.menu-contest{
  border-color:rgba(239,68,68,.42);
  background:linear-gradient(180deg,rgba(127,29,29,.34),rgba(185,28,28,.18));
  box-shadow:0 12px 30px rgba(0,0,0,.22), 0 0 0 1px rgba(239,68,68,.10) inset;
}
.menu-btn.menu-contest::before{
  background:linear-gradient(90deg,transparent,rgba(248,113,113,.82),transparent);
  opacity:.92;
}
.menu-btn.menu-contest:hover{
  border-color:rgba(248,113,113,.72);
  background:linear-gradient(180deg,rgba(127,29,29,.42),rgba(220,38,38,.24));
  box-shadow:0 16px 36px rgba(0,0,0,.26), 0 0 0 1px rgba(248,113,113,.14) inset;
}
.menu-btn.menu-contest.active-page{
  border:2px solid rgba(255,115,115,.98);
  background:linear-gradient(180deg,rgba(220,38,38,.72),rgba(127,29,29,.68));
  box-shadow:
    0 18px 42px rgba(0,0,0,.32),
    0 0 0 2px rgba(248,113,113,.20),
    0 0 24px rgba(239,68,68,.42),
    inset 0 1px 0 rgba(255,255,255,.18);
  transform:translateY(-2px);
}
.menu-btn.menu-contest.active-page::before{
  height:4px;
  background:linear-gradient(90deg,transparent,#fff1f2,transparent);
  opacity:1;
}
.menu-btn.menu-contest.active-page .menu-label{
  color:#fff;
  text-shadow:0 1px 8px rgba(0,0,0,.55);
}


.carousel-floating-langs{
  position:absolute;
  top:auto;
  left:18px;
  bottom:18px;
  z-index:4;
  display:flex;
  flex-direction:row;
  gap:8px;
  transform:none;
  align-items:center;
  justify-content:flex-start;
  padding:0;
  border-radius:0;
  background:none;
}
.carousel-floating-langs .lang{
  min-width:112px;
  padding:8px 16px;
  border:1px solid rgba(255,255,255,.28);
  border-radius:999px;
  background:rgba(2,6,23,.18);
  color:#fff;
  font-weight:800;
  font-size:.98rem;
  line-height:1.1;
  box-shadow:0 8px 18px rgba(0,0,0,.16);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
.carousel-floating-langs .lang:hover{background:rgba(2,6,23,.26)}
.carousel-floating-langs .lang.active{
  background:rgba(251,191,36,.18);
  color:#fff;
  border-color:rgba(251,191,36,.70);
}
.hero{
  align-items:center;
  justify-content:flex-start;
}
.hero > div:first-child{width:100%}
.actions,.lang-buttons,.fullscreen-btn{display:none !important}
.mobile-language-bar{
  display:none !important;
}

@media(max-width:760px){
  .carousel-floating-langs{
    display:none !important;
  }
  .mobile-language-bar{
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
    width:100%;
    padding:9px 12px 11px;
    background:rgba(2,6,23,.96);
    border-top:1px solid rgba(148,163,184,.16);
    border-bottom:1px solid rgba(148,163,184,.22);
  }
  .mobile-language-bar .lang{
    min-width:0;
    min-height:42px;
    padding:7px 5px;
    border:1px solid rgba(255,255,255,.24);
    border-radius:14px;
    background:rgba(255,255,255,.035);
    color:#fff;
    font:800 clamp(.84rem,3.6vw,1rem)/1.15 inherit;
    white-space:nowrap;
    box-shadow:none;
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
  }
  .mobile-language-bar .lang.active{
    color:#fff;
    border-color:rgba(251,191,36,.88);
    background:rgba(251,191,36,.14);
    box-shadow:0 0 0 1px rgba(251,191,36,.12) inset;
  }
  .mobile-language-bar .lang:active{
    transform:translateY(1px);
  }
}

@media(max-width:760px){
  .carousel-floating-langs .lang{
    min-width:100px;
    padding:8px 12px;
    font-size:.90rem;
  }
  .hero{margin-bottom:12px}
}
@media(max-width:460px){
  .carousel-floating-langs{bottom:12px; left:10px;}
  .carousel-floating-langs .lang{min-width:92px;padding:7px 11px;font-size:.86rem}
}


/* Les titres externes des pages chargées sont supprimés. */
.hero{display:none !important;}
.page{margin-top:16px;}

/* Les bannières ouvrent la carte interactive. */
.carousel-slide{
  position:relative;
  cursor:pointer;
}
.carousel-slide:focus-visible{
  outline:3px solid var(--gold);
  outline-offset:-4px;
}
.carousel-map-hint{
  position:absolute;
  left:50%;
  bottom:54px;
  z-index:2;
  padding:10px 18px;
  border:1px solid rgba(255,255,255,.34);
  border-radius:999px;
  background:rgba(2,6,23,.72);
  color:#fff;
  font-size:1rem;
  font-weight:800;
  line-height:1.2;
  white-space:nowrap;
  pointer-events:none;
  opacity:0;
  transform:translate(-50%,8px);
  box-shadow:0 10px 28px rgba(0,0,0,.32);
  backdrop-filter:blur(8px);
  transition:opacity .18s ease,transform .18s ease;
}
.carousel-slide:hover .carousel-map-hint,
.carousel-slide:focus-visible .carousel-map-hint{
  opacity:1;
  transform:translate(-50%,0);
}
@media(max-width:760px){
  .carousel-map-hint{
    bottom:48px;
    padding:8px 14px;
    font-size:.9rem;
  }
}

/* Menu principal sans pictogrammes décoratifs. */
.menu-btn{
  min-height:66px;
  padding:13px 12px;
  gap:0;
}
.menu-icon{display:none!important}
.menu-label{
  min-height:auto;
  display:flex;
  align-items:center;
  justify-content:center;
  -webkit-line-clamp:3;
  line-height:1.28;
}
@media(max-width:760px){
  .menu-btn{min-height:58px;padding:11px 9px}
}

/* Texte du menu agrandi pour mieux occuper toute la surface des boutons. */
.menu-label{
  width:100%;
  font-size:clamp(1.05rem,1.18vw,1.28rem);
  line-height:1.16;
  font-weight:800;
}
@media(max-width:1100px){
  .menu-label{font-size:1.08rem;}
}
@media(max-width:760px){
  .menu-label{font-size:1.02rem;line-height:1.14;}
}
@media(max-width:460px){
  .menu-label{font-size:1rem;}
}

@media(max-width:760px){
  .carousel-dots{display:none !important;}
}




.carousel-flag-wrap{
  position:absolute;
  left:18px;
  bottom:62px;
  z-index:4;
  pointer-events:none;
}
.carousel-flag{display:block;height:auto;opacity:.50}
.carousel-flag-desktop{width:120px;}
.carousel-flag-mobile{display:none;width:72px;}
@media(max-width:760px){
  .carousel-flag-wrap{left:10px; bottom:10px;}
  .carousel-flag-desktop{display:none;}
  .carousel-flag-mobile{display:block;}
}

@keyframes contestPulseOpacity{
  0%,100%{opacity:.10;}
  50%{opacity:.60;}
}

/* Ancien bouton de concours retiré de la bannière pour la version d’évaluation. */
.contest-banner-button{display:none !important;
  position:absolute;
  left:18px;
  bottom:78px;
  z-index:4;
  display:block;
  width:min(220px,30vw);
  opacity:.10;
  animation:contestPulseOpacity 6s ease-in-out infinite;
  transition:transform .18s ease;
}
.contest-banner-button img{
  display:block;
  width:100%;
  height:auto;
  border:0;
}
.contest-banner-button:hover,
.contest-banner-button:focus-visible{
  transform:translateY(-1px);
}
@media(max-width:760px){
  .contest-banner-button{display:none !important;
    left:10px;
    bottom:12px;
    width:min(150px,42vw);
  }
  .contest-banner-button:hover,
  .contest-banner-button:focus-visible{
  }
}


/* Version d'évaluation : ordre fixe des boutons de langue, indépendant du sens RTL/LTR. */
.carousel-floating-langs,
.mobile-language-bar {
  direction: ltr;
}
.carousel-floating-langs .lang,
.mobile-language-bar .lang {
  unicode-bidi: isolate;
}
.carousel-floating-langs .lang[data-lang="ar"],
.mobile-language-bar .lang[data-lang="ar"] {
  direction: rtl;
}


.site-credit-band{
  width:100%;
  height:24px;
  margin:0;
  background:#050505;
  border-top:1px solid rgba(255,255,255,.06);
  overflow:hidden;
}
.site-credit-inner{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.site-credit-text{
  color:#8e939d;
  font-size:.80rem;
  line-height:1;
  white-space:nowrap;
  display:inline-flex;
  align-items:center;
  gap:0;
  max-width:100%;
}
.site-credit-text span,
.site-credit-text a{
  display:inline-block;
  white-space:nowrap;
}
.site-credit-text a{
  color:#9ca3af;
  text-decoration:none;
}
.site-credit-text a:hover,
.site-credit-text a:focus-visible{
  color:#d1d5db;
  text-decoration:underline;
}
@media(max-width:760px){
  .site-credit-band{
    height:22px;
  }
  .site-credit-inner{
    justify-content:flex-start;
  }
  .site-credit-text{
    width:max-content;
    max-width:none;
    flex:0 0 auto;
    padding:0;
    font-size:.72rem;
    animation:creditMarquee 20s linear infinite;
    will-change:transform;
  }
}
@keyframes creditMarquee{
  0%{transform:translateX(-100%);}
  100%{transform:translateX(100vw);}
}
