/* sitvideo.fr — reprise de l'apparence du thème « SiTVideo » (ja_elastica) dans Cassiopeia.
   Fichier : media/templates/site/cassiopeia/css/user.css (chargé automatiquement par Cassiopeia).
   Valeurs relevées sur le site en ligne le 06/11/2026. */

@font-face {
  font-family: "eras";
  src: url("../../../../../images/site/fonts/ERASBD.TTF") format("truetype");
  font-display: swap;
}

:root {
  --cassiopeia-color-primary: #000;
  --cassiopeia-color-link: #ff0000;
  --cassiopeia-color-hover: #ff5151;
  --stv-red: #990000;
  --stv-red-line: #c10000;
  --body-bg: #000;
  --body-color: #fff;
}

/* ---------- Base : texte 14,3 px blanc sur noir ---------- */
body.site {
  background: #000;
  color: #fff;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 14.3px;
  line-height: 1.6;
}
a { color: #ff0000; text-decoration: none; }
a:hover, a:focus { color: #ff5151; text-decoration: none; }
p { margin: 1em 0; }

/* ---------- En-tête : bandeau, logo ---------- */
.container-header {
  background: #000 url("../../../../../images/site/bandeau.jpg") no-repeat center bottom;
  background-size: cover;
  border-bottom: 1px solid var(--stv-red-line);
  box-shadow: none;
}
.container-header .navbar-brand img { max-height: 70px; width: auto; }

/* ---------- Menu principal : Eras 12 px, majuscules, filet rouge ---------- */
.container-header .mod-menu > li > a,
.container-header .metismenu > li > a {
  font-family: "eras", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #fff;
  padding: .4em 12px;
  border-top: 1px solid var(--stv-red);
  transition: border-color .3s ease, color .3s ease;
}
.container-header .metismenu > li > a:hover,
.container-header .metismenu > li.active > a {
  color: #fff;
  border-top: 2px solid #ff0000;
}
.container-header .metismenu > li > button.mm-toggler { color: #fff; }

/* Sous-menus : boîte grise translucide, bord rouge, coins bas arrondis */
.container-header .metismenu .mm-collapse {
  background: rgba(50, 50, 50, .85);
  border: 1px solid var(--stv-red);
  border-radius: 0 0 2em 2em;
  box-shadow: 0 0 4px #817f7f;
  min-width: 200px;
  padding: .3em 0 1em;
}
.container-header .metismenu .mm-collapse a {
  font-family: "eras", Arial, sans-serif;
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #fff;
  padding: 12px;
  display: block;
}
.container-header .metismenu .mm-collapse a:hover,
.container-header .metismenu .mm-collapse .current > a { color: #ff0000; }

/* Ouverture au survol sur ordinateur (comme l'ancien site) */
@media (min-width: 992px) {
  .container-header .metismenu > li.parent { position: relative; }
  .container-header .metismenu > li.parent:hover > .mm-collapse,
  .container-header .metismenu > li.parent:focus-within > .mm-collapse {
    display: block !important;
    height: auto !important;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
  }
}

/* ---------- Mise en page 60 % contenu / 40 % colonne de droite (ordinateur) ---------- */
@media (min-width: 992px) {
  body.has-sidebar-right:not(.has-sidebar-left) .site-grid {
    grid-template-columns: [full-start] 0 [main-start] repeat(3, minmax(0, 2fr)) minmax(0, 4fr) [main-end] 0 [full-end];
    max-width: calc(79.5rem + 5em);
    margin-left: auto;
    margin-right: auto;
    padding: 0 1em;
  }
}

/* ---------- Pas de titre affiché sur les articles (comme l'ancien site) ---------- */
.com-content-article .page-header,
.blog-item .page-header,
.blog-item .item-title,
.blog-featured .page-header,
.com-content-category-blog > .page-header { display: none; }

/* ---------- Titres dans le texte ---------- */
h1, h2, h3, .page-header h1, .page-header h2 {
  font-family: "eras", Arial, sans-serif;
  color: #fff;
  line-height: 1.2;
}
h1 { font-size: 1.6em; }
h2 { font-size: 1.4em; }
h3 { font-size: 1.2em; }
h4 {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1em;
  font-weight: 700;
  text-transform: uppercase;
}

/* ---------- Articles : panneau noir, bordure rouge à gauche ---------- */
.com-content-article,
.blog-item {
  background: #000;
  color: #fff;
  border-left: 5px solid var(--stv-red);
  border-bottom: 1px solid var(--stv-red);
  border-bottom-left-radius: 2em;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .25);
  padding: .5em 1.5em 1em 2em !important; /* retrait du texte par rapport au bord rouge */
  margin-bottom: 1.5em;
}
.blog-item .item-content, .com-content-article .com-content-article__body { color: #fff; }
abbr[title] { text-decoration: underline dotted #ff0000; cursor: help; }

/* ---------- Colonne de droite : cadres arrondis à bordure rouge ---------- */
.sidebar-right.card, .sidebar-left.card {
  background: transparent;
  color: #fff;
  border: 2px solid var(--stv-red);
  border-radius: 2em;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .25);
  margin: 1em;
}
.sidebar-right .card-body { padding: 1.5em; }
.card-header { background: transparent; color: #fff; border: 0; }
.sidebar-right table { width: 100% !important; }
.sidebar-right td { width: auto !important; }

/* ---------- Fil d'Ariane ---------- */
.mod-breadcrumbs { background: transparent; padding: 0; margin: .5em 0 1em; }
.mod-breadcrumbs, .mod-breadcrumbs .breadcrumb-item { color: #fff; }
.mod-breadcrumbs a { color: #ff0000; }
.mod-breadcrumbs .breadcrumb-item + .breadcrumb-item::before { color: #ff0000; }

/* ---------- Vidéos YouTube ---------- */
.auto-resizable-iframe > div, .stv-video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
}
.auto-resizable-iframe iframe, .stv-video-frame iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
/* Grille de films : miniatures cliquables (ouvrent la vidéo dans le popup), comme l'ancien Videobox */
.stv-videos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2em 1.5em;
  margin: 1.5em 0;
}
.stv-video { margin: 0; width: 160px; text-align: center; }
.stv-video-thumb { display: block; position: relative; cursor: pointer; }
.stv-video-thumb img {
  display: block;
  width: 150px; height: 112px;
  margin: 0 auto;
  object-fit: cover;
  border: 3px solid #ccc;
  border-radius: 5px;
  box-shadow: 0 0 4px #817f7f;
  transition: border-color .3s ease, transform .3s ease;
}
.stv-video-thumb::after {
  content: "";
  position: absolute; left: 50%; top: 56px;
  transform: translate(-50%, -50%);
  width: 0; height: 0;
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent rgba(255, 255, 255, .85);
  filter: drop-shadow(0 0 3px #000);
  opacity: 0;
  transition: opacity .3s ease;
}
.stv-video-thumb:hover img, .stv-video-thumb:focus-visible img { border-color: #ff0000; transform: scale(1.04); }
.stv-video-thumb:hover::after, .stv-video-thumb:focus-visible::after { opacity: 1; }
.stv-video figcaption {
  margin-top: .4em;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.3;
}

/* ---------- Galeries (remplacent ImageFlow / Flexslider) ---------- */
.stv-gallery {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: .5rem;
  scrollbar-color: var(--stv-red) #111;
}
.stv-gallery a { flex: 0 0 auto; scroll-snap-align: start; }
.stv-gallery img {
  height: 200px; width: auto; display: block;
  border-radius: 4px; border: 1px solid #222;
}
.sidebar-right .stv-gallery img { height: 150px; }

/* ---------- Divers ---------- */
.com-content-article td, .blog-item td, .mod-custom td { vertical-align: top; }
img { max-width: 100%; height: auto; }

/* ---------- Pied de page ---------- */
.container-footer {
  background: #000;
  border-top: 1px solid var(--stv-red-line);
  color: #e4e4e4;
  font-size: 12.87px;
}
.container-footer a { color: #fff; }
.container-footer a:hover { color: #ff0000; font-weight: bold; }

/* ---------- Diaporamas (créés par js/user.js à partir des .stv-gallery) ---------- */
.stv-slideshow {
  position: relative;
  aspect-ratio: 3 / 2;
  width: 100%;
  margin: 1em 0;
  background: #000;
  border: 1px solid #222;
  border-radius: 4px;
  overflow: hidden;
}
.stv-slideshow .stv-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}
.stv-slideshow .stv-slide.is-active { opacity: 1; pointer-events: auto; }
.stv-slideshow .stv-slide img {
  width: 100%; height: 100%;
  object-fit: contain;
  border: 0; border-radius: 0;
  max-width: none;
}
.stv-slideshow .stv-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.2em; height: 2.2em;
  border: 1px solid var(--stv-red);
  border-radius: 50%;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  font-size: 1.4em;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity .3s ease;
}
.stv-slideshow:hover .stv-nav, .stv-slideshow .stv-nav:focus-visible { opacity: 1; }
.stv-slideshow .stv-nav:hover { background: var(--stv-red); }
.stv-slideshow .stv-prev { left: .5em; }
.stv-slideshow .stv-next { right: .5em; }
.stv-slideshow .stv-counter {
  position: absolute;
  right: .6em; bottom: .4em;
  z-index: 2;
  font-size: .8em;
  color: #fff;
  background: rgba(0, 0, 0, .55);
  padding: .1em .5em;
  border-radius: 1em;
}
@media (hover: none) { .stv-slideshow .stv-nav { opacity: .8; } }

/* ---------- Popup photo (lightbox, créé par js/user.js) ---------- */
.stv-lightbox {
  max-width: 96vw;
  max-height: 96vh;
  padding: 0;
  border: 2px solid var(--stv-red);
  border-radius: 1em;
  background: #000;
  color: #fff;
  overflow: visible;
}
.stv-lightbox::backdrop { background: rgba(0, 0, 0, .85); }
.stv-lightbox figure { margin: 0; text-align: center; }
.stv-lightbox img {
  display: block;
  max-width: 92vw;
  max-height: 86vh;
  width: auto; height: auto;
  border-radius: 1em 1em 0 0;
}
.stv-lightbox figcaption { padding: .4em 1em .6em; font-size: .9em; }
.stv-lightbox figcaption:empty { display: none; }
.stv-lb-close, .stv-lb-nav {
  position: absolute;
  z-index: 2;
  border: 1px solid var(--stv-red);
  border-radius: 50%;
  background: rgba(0, 0, 0, .7);
  color: #fff;
  width: 2.2em; height: 2.2em;
  font-size: 1.4em;
  line-height: 1;
  cursor: pointer;
}
.stv-lb-close:hover, .stv-lb-nav:hover { background: var(--stv-red); }
.stv-lb-close { top: -.9em; right: -.9em; }
.stv-lb-nav { top: 50%; transform: translateY(-50%); }
.stv-lb-prev { left: .5em; }
.stv-lb-next { right: .5em; }
.stv-lightbox.is-single .stv-lb-nav { display: none; }
.stv-lb-counter {
  position: absolute; left: .8em; bottom: .5em;
  font-size: .8em; background: rgba(0, 0, 0, .6); padding: .1em .5em; border-radius: 1em;
}
.stv-lb-counter:empty { display: none; }
a.stv-zoom { cursor: zoom-in; }

/* ---------- Liens vidéo (ouverts dans le popup) ---------- */
a.stv-video-link { text-decoration: underline; }
a.stv-video-link::before { content: "▶ "; font-size: .8em; text-decoration: none; display: inline-block; margin-right: .15em; }
.stv-lightbox.is-video img { display: none; }
.stv-lb-video:empty { display: none; }
.stv-lb-video { width: min(90vw, 1100px); aspect-ratio: 16 / 9; }
.stv-lb-video iframe { width: 100%; height: 100%; border: 0; border-radius: 1em 1em 0 0; display: block; }

/* Curseur loupe sur les liens d'images qui s'ouvrent en popup */
:is(.com-content-article, .blog-item, .mod-custom, .sidebar-right) a:is([href$=".jpg" i], [href$=".jpeg" i], [href$=".png" i], [href$=".gif" i], [href$=".webp" i]) { cursor: zoom-in; }

/* Article affiché dans le popup (liens « stv-popup-article ») */
.stv-lb-html:empty { display: none; }
.stv-lightbox.is-html img, .stv-lightbox.is-html .stv-lb-video { display: none; }
.stv-lb-html {
  width: min(90vw, 700px);
  max-height: 80vh;
  overflow: auto;
  padding: 1.5em 2em;
  text-align: left;
  color: #fff;
}
.stv-lb-html h4 { margin-top: 0; }
a.stv-popup-article { cursor: pointer; }

/* Petits diaporamas (photos d'origine de 200 px) */
.stv-diapo-center { display: flex; justify-content: center; margin: 1em 0; }
.stv-slideshow.stv-slideshow-small { width: 320px; max-width: 100%; aspect-ratio: 4 / 3; border: 1px solid #f2f2f2; }

/* ---------- Menu burger (téléphone et tablette, < 992 px) ---------- */
@media (max-width: 991.98px) {
  .container-header .navbar-brand img { max-width: 75vw; height: auto; }
  .container-header .container-nav { justify-content: flex-end; }
  .container-header .navbar { justify-content: flex-end; flex-wrap: wrap; width: 100%; }
  .container-header .navbar-toggler {
    color: #fff;
    background: rgba(0, 0, 0, .65);
    border: 1px solid var(--stv-red);
    border-radius: 8px;
    padding: .35em .65em;
    font-size: 1.3rem;
  }
  .container-header .navbar-toggler:hover,
  .container-header .navbar-toggler[aria-expanded="true"] { background: var(--stv-red); }
  .container-header .navbar-toggler:focus { box-shadow: 0 0 0 2px rgba(255, 0, 0, .4); }
  .container-header .navbar-collapse {
    width: 100%;
    margin-top: .6em;
    background: rgba(20, 20, 20, .95);
    border: 1px solid var(--stv-red);
    border-radius: 0 0 1.5em 1.5em;
    padding: .3em 0 1em;
  }
  .container-header .metismenu { width: 100%; }
  .container-header .metismenu > li { border-bottom: 1px solid #2a2a2a; }
  .container-header .metismenu > li > a,
  .container-header .metismenu > li > a:hover,
  .container-header .metismenu > li.active > a {
    display: block;
    border-top: 0;
    padding: .9em 1.2em;
    font-size: 13px;
  }
  .container-header .metismenu > li.active > a { color: #ff0000; }
  .container-header .metismenu > li > button.mm-toggler { position: absolute; right: .6em; top: .35em; height: 2.6em; width: 3em; bottom: auto; }
  .container-header .metismenu > li { flex-wrap: wrap; height: auto; position: relative; }
  .container-header .metismenu .mm-collapse {
    position: static !important;
    flex-basis: 100%;
    width: 100%;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    min-width: 0;
    padding: 0 0 .5em 1.5em;
  }
  .container-header .metismenu .mm-collapse a { padding: .6em 1em; }
}

/* ---------- Vidéo « à la demande » (RGPD) : image cliquable à la place du lecteur YouTube ---------- */
.stv-video-facade {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #000;
  cursor: pointer;
  overflow: hidden;
}
.auto-resizable-iframe .stv-video-facade, .stv-video-frame .stv-video-facade { position: absolute; inset: 0; }
.stv-video-facade img { width: 100%; height: 100%; object-fit: cover; border: 0; display: block; transition: transform .4s ease; }
.stv-video-facade:hover img { transform: scale(1.03); }
.stv-play {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 68px; height: 48px;
  border-radius: 12px;
  background: rgba(193, 0, 0, .9);
  transition: background .3s ease;
}
.stv-play::after {
  content: "";
  position: absolute; left: 50%; top: 50%;
  transform: translate(-40%, -50%);
  border-style: solid;
  border-width: 10px 0 10px 17px;
  border-color: transparent transparent transparent #fff;
}
.stv-video-facade:hover .stv-play { background: #ff0000; }

/* Mention sous le lecteur du popup */
.stv-lb-notice { font-size: .75em; color: #aaa; padding: 0 1em .6em; text-align: center; }
.stv-lightbox:not(.is-video) .stv-lb-notice { display: none; }

/* Liens du pied de page : jamais soulignés */
.container-footer a, .container-footer a:hover, .container-footer a:focus { text-decoration: none; }

/* Champs de formulaire : texte foncé sur fond blanc (le thème noir rendait le texte blanc sur blanc) */
.form-control, .form-select, textarea.form-control {
  color: #212529 !important;
  background-color: #fff !important;
}
.form-control::placeholder { color: #6c757d; }
.form-check-input { background-color: #fff; }

/* Boutons principaux (ex. « Envoyer » du formulaire) : rouges en permanence, plus clairs au survol */
.btn-primary {
  background-color: #ff0000 !important;
  border-color: #ff0000 !important;
  color: #fff !important;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background-color: #ff5151 !important;
  border-color: #ff5151 !important;
  color: #fff !important;
}

/* ---------- Bandeau de consentement (vidéos YouTube) ---------- */
.stv-consent {
  position: fixed; left: 1em; right: 1em; bottom: 1em; z-index: 1050;
  max-width: 46rem; margin: 0 auto;
  background: #111; color: #fff;
  border: 2px solid #990000; border-radius: 1em;
  padding: 1em 1.25em;
  box-shadow: 0 .5em 2em rgba(0, 0, 0, .6);
  font-size: .95em;
}
.stv-consent p { margin: 0 0 .8em; }
.stv-consent a { color: #ff5151; }
.stv-consent-actions { display: flex; gap: .75em; justify-content: flex-end; flex-wrap: wrap; }
/* Les deux boutons ont le même poids visuel, comme le demande la CNIL */
.stv-consent-actions button {
  min-width: 8em; padding: .5em 1.2em;
  border: 2px solid #ff0000; border-radius: .4em;
  background: #ff0000; color: #fff; font-weight: bold; cursor: pointer;
}
.stv-consent-actions button:hover, .stv-consent-actions button:focus { background: #ff5151; border-color: #ff5151; }
.stv-consent-manage-wrap { margin: .5em 0 0; text-align: center; font-size: .9em; }
button.stv-video-facade { padding: 0; border: 0; }

/* ---------- Titre principal (h1) : lu par Google et les lecteurs d'écran, invisible à l'écran ---------- */
.page-header:has(> h1),
.com-content-article > .page-header:has(> h1),
.blog-featured > .page-header:has(> h1),
.com-content-category-blog > .page-header:has(> h1),
.com-contact > h1 {
  display: block !important;
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  margin: -1px !important; padding: 0 !important; border: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important;
  white-space: nowrap !important;
}
