/* =========================================
   1) BLOCS IMAGES SPÉCIAUX
   ========================================= */

.ima-container,
.ima-container2,
.ima-container3{
  position: relative;
  display: block;
  width: 300px;
  height: 400px;
  margin: 0 auto;
  clear: both;
  background: transparent;
  box-shadow: none !important;
  filter: none !important;
}

.ima-container{ margin-bottom: 200px; }
.ima-container2{ margin-top: -50px; }

.ima-container3{
  margin-top: -10px;
  margin-bottom: 200px;
}

/* image pseudo */

.ima-container::before,
.ima-container2::before,
.ima-container3::before{
  content: "";
  position: absolute;
  inset: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center 40px;
}

.ima-container::before,
.ima-container2::before{
  background-image: url("../source/img/logo-base-2028.png");
}

.ima-container3::before{
  background-image: url("logo-base-2.png");
  background-color: black;
}



/* =========================================
   2) FOOTER
   ========================================= */

#fin{
  position: static !important;
  width: 100%;
  margin: 80px 0;
  border: 0 !important;
  padding: 24px 0 !important;
  box-shadow: none !important;
}

footer{ background: transparent !important; }

body::after{ content: none !important; }

#fin .centered,
#fin .centered-content{
  display: flex;
  justify-content: center;
  align-items: center;
}

#fin img{
  display: block;
  width: 350px;
  height: auto;
  max-width: 90vw;
  cursor: pointer;
}



/* =========================================
   3) MODE SOMBRE / VIDÉO
   ========================================= */

html.is-dark,
body.is-dark{
  background: #000 !important;
  color: #fff !important;
}


/* boutons contrôles */

#controls-container button{
  font-size: 24px;
  padding: 10px 20px;
  cursor: pointer;
  background: #444;
  color: #fff;
  border: none;
  border-radius: 8px;
  transition: background .3s;
  white-space: nowrap;
  line-height: 1.2;
}

#controls-container button:hover{
  background: #888;
}



/* =========================================
   4) DROPDOWN FILMS
   ========================================= */

#video-dropdown{
  position: fixed;
  top: calc(env(safe-area-inset-top) + 64px + 60px);
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 420px);
  z-index: 9500;
}



/* =========================================
   5) TITRE DU FILM
   ========================================= */

.film-current-title{
  margin-top: 80px;
  text-align: center;

  font-family: "Montserrat","Helvetica Neue",Helvetica,Arial,sans-serif;
  font-weight: 600;

  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;

  font-size: clamp(1rem, 3.5vw, 1.6rem);
  opacity: 0.9;

  padding: 0 12px;
  box-sizing: border-box;
}

@media (max-width: 768px){

  .film-current-title{
    font-size: clamp(1.1rem, 5vw, 1.4rem);
    letter-spacing: 0.1em;
  }

}



/* =========================================
   6) PILLS TITRES
   ========================================= */

.titles{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;

  gap: 10px 12px;
  margin: 22px auto 40px;

  max-width: 1100px;
  padding: 0 14px;
}

.title{
  cursor: pointer;
  user-select: none;

  padding: 10px 14px;
  border-radius: 999px;

  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);

  font-family: "Montserrat","Helvetica Neue",Helvetica,Arial,sans-serif;
  font-size: 0.95rem;
  font-weight: 500;

  letter-spacing: 0.06em;
  text-transform: uppercase;

  transition:
    transform .15s ease,
    background .2s ease,
    border-color .2s ease,
    opacity .2s ease;
}

.title:hover{
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.35);
  transform: translateY(-1px);
}

.title.is-active{
  background: rgba(255,255,255,.20);
  border-color: rgba(255,255,255,.55);
}

@media (max-width: 700px){

  .titles{ display:none !important; }

  .title{
    font-size: 0.85rem;
    padding: 9px 12px;
    letter-spacing: 0.05em;
  }

}



/* =========================================
   7) RESPONSIVE GÉNÉRAL
   ========================================= */

@media (max-width: 600px){

  html, body{
    padding-inline: var(--mobile-gutter);
  }

  .centered-content,
  .justifie-texte,
  .bloc-texte{
    max-width: 100% !important;
    padding-inline: var(--mobile-gutter);
  }

  p{
    max-width: 100% !important;
    line-height: 1.5;
  }

  img, video, iframe{
    max-width: 70%;
    height: auto;
  }

}



/* =========================================
   8) EXTRAS
   ========================================= */

section{ width:100%; }

.ma{ margin-top:20px; }

/* séparateur */

.ligne-pleine{
  display:inline-block;
  width:100%;
  border-bottom:2px solid #000;
  margin:0 6px;
}

/* scoreboards */

#scoreboard,
#score{
  font-size: clamp(2rem, 5vw, 3.2rem) !important;
  font-weight: 900;
  letter-spacing: 1px;
  color: #ffffff;
  margin: 20px 0 30px;
  text-align: center;
}



/* =========================================
   9) TEXTE ET IMAGES
   ========================================= */

p{
  font-size:2rem;
  line-height:1.3;
}

img{
  width:70%;
  max-width:1800px;
  height:auto;
  margin:0 auto;
  display:block;
  padding:20px 0;
}



/* =========================================
   10) POÈMES MOBILE
   ========================================= */

@media (max-width:700px){

  html,body{ overflow-x:hidden; }

  main{
    max-width:100%!important;
    width:100%!important;
    padding-left:1rem!important;
    padding-right:1rem!important;
    box-sizing:border-box;
  }

  .poeme{
    width:100%!important;
    max-width:100%!important;
    margin:2.2rem 0!important;
    padding:0!important;
  }

  .poeme h2{
    font-size: clamp(1.4rem,5.5vw,1.9rem)!important;
    margin:1.6rem 0 .5rem 0!important;
    line-height:1.15;
  }

  .poeme .strophe.preline,
  .poeme .strophe.preline.ma{
    font-size: clamp(1.05rem,4.2vw,1.25rem)!important;
    line-height:1.45!important;
    white-space:pre-line;
    overflow-wrap:anywhere;
  }

}



/* =========================================
   11) ARABE
   ========================================= */

html[lang="ar"][dir="rtl"] main{
  max-width:80ch!important;
  margin:0 auto;
  padding-inline:2ch;
  width:80%;
}

html[lang="ar"][dir="rtl"] main p{
  font-size:3rem;
  font-weight:700;
  font-family:"Dubai","Noto Naskh Arabic","Amiri",serif;
  text-align:right;
  text-align-last:right;
  line-height:2;
  margin:0 0 1.2em 0;
}



/* =========================================
   12) IMAGE VIEWER
   ========================================= */

#image1.image-display{
  display:block;
  width:min(62vw,820px);
  max-width:100%;
  height:auto;
  margin:1.2rem auto;
}

#image1.zoomed{
  position:relative;
  z-index:50;
  box-shadow:0 20px 60px rgba(0,0,0,.45);
}

#image-description,
.image-description{
  --desc-max:70%;
  text-align:center!important;
}



/* =========================================
   13) IMAGES ZOOMABLES
   ========================================= */

img.visu.zoomable{
  display:block;
  width:100%;
  max-width:100%;
  height:auto;
  margin:18px auto;

  border-radius:12px;
  cursor:zoom-in;

  user-select:none;
  -webkit-user-drag:none;
}



/* =========================================
   14) OVERLAY ZOOM
   ========================================= */

.zoom-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.86);
  display:none;
  z-index:99990;
}

.zoom-overlay.is-open{ display:block; }

body.no-scroll{ overflow:hidden; }



.zoom-viewer{
  position:fixed;
  inset:0;
  z-index:99999;

  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
}

.zoom-viewer.is-open{ display:flex; }

.zoom-box{
  width:min(96vw,1200px);
  max-height:92vh;
  display:grid;
  gap:10px;
  justify-items:center;
}

.zoom-big{
  max-width:100%;
  max-height:78vh;
  border-radius:14px;
  box-shadow:0 20px 70px rgba(0,0,0,.55);
  cursor:zoom-out;
}

.zoom-cap{
  color:#fff;
  opacity:.95;
  font-size:16px;
  line-height:1.5;
  text-align:center;
}



/* =========================================
   15) BOUTONS ZOOM
   ========================================= */

.zoom-btn{
  position:fixed;
  top:50%;
  transform:translateY(-50%);

  border:0;
  border-radius:999px;

  padding:12px 14px;

  background:rgba(255,255,255,.14);
  color:#fff;
  font-size:20px;

  cursor:pointer;
  user-select:none;

  z-index:100000;
}

.zoom-btn:hover{
  background:rgba(255,255,255,.22);
}

.zoom-prev{ left:14px; }
.zoom-next{ right:14px; }

.zoom-close{
  position:fixed;
  top:14px;
  right:14px;

  border:0;
  border-radius:999px;

  padding:10px 14px;

  background:rgba(255,255,255,.14);
  color:#fff;
  font-size:16px;

  cursor:pointer;
  z-index:100000;
}

.zoom-close:hover{
  background:rgba(255,255,255,.22);
}

@media (max-width:768px){

  .zoom-btn{
    padding:10px 12px;
    font-size:18px;
  }

}


.retour-debut {
    width: 100%;
    text-align: center;
    margin: 40px auto 35px auto;
    clear: both;
}

.retour-debut a {
    display: inline-block;
    font-size: 1.3rem;
    color: #000;
    text-decoration: none;
}

.retour-debut a:hover {
    text-decoration: underline;
}

.partage-reseaux {
    width: 100%;
    margin: 20px auto;
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
    clear: both;
}

.partage-reseaux h2 {
    margin: 0 0 10px;
    color: #444;
    font-size: 24px;
    font-weight: normal;
    text-transform: uppercase;
    text-align: center;
}

.partage-liens {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 9px;
    width: 100%;
    margin: 0 auto;
    direction: ltr;
}

.partage-liens a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: #262a2d;
    color: #ffffff !important;
    text-decoration: none;
    transition: transform 0.2s, background 0.2s;
}

.partage-liens a:hover {
    background: #3a4044;
    color: #ffffff !important;
    transform: translateY(-3px);
}

.partage-liens svg {
    width: 34px;
    height: 34px;
    fill: #ffffff !important;
    color: #ffffff !important;
}

.partage-liens a:hover svg {
    fill: #ffffff !important;
}