@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&display=swap');

/* ── Custom properties ──────────────────────────────────────────────────── */
:root {
  --bg:           #2b2c30;
  --bg-nav:       #2d3035;
  --bg-panel:     #3a3b40;
  --bg-panel-alt: #2b2b2f;
  --bg-panel-pri: #2f6792;
  --text:         #ffffff;
  --text-muted:   #7c8290;
  --text-white:   #ffffff;
  --link:         #b3810e;
  --link-hover:   #ecb642;
  --accent:       #ecb642;
  --nav-h:        55px;
  --max-w:        980px;
  --text-nav:     #95979b;
  --border-faint: rgba(255, 255, 255, 0.07);
}

/* ── Reset / Base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 22px;
}

a { color: var(--link); text-decoration: none; background: transparent; }
a:hover { color: var(--link-hover); text-decoration: underline; }
a:active, a:hover { outline: 0; }

h1, h2, h3, h4, h5, h6 {
  color: #d7d7d9;
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  margin: 0 0 16px;
}
h1 { font-size: 34px; line-height: 38px; }
h2 { font-size: 26px; line-height: 30px; }
h3 { font-size: 28px; line-height: 34px; }
* + h1, * + h2, * + h3, * + h4, * + h5, * + h6 { margin-top: 11px; }

img { max-width: 100%; height: auto; }
p { margin: 0 0 14px; }
p:last-child { margin-bottom: 0; }
em { color: var(--accent); }
ul, ol { padding-left: 1.5em; margin: 0 0 14px; }

/* ── Conteneur centré ───────────────────────────────────────────────────── */
.uk-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Header — logo + nav ────────────────────────────────────────────────── */
.tm-block-top {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #242528;
}

.tm-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: 20px;
}
.tm-logo img { display: block; height: 57px; width: auto; }

.tm-navbar {
  background: #242528;
}

.tm-navbar .uk-container {
  display: flex;
  align-items: center;
  min-height: var(--nav-h);
}

/* Liens nav */
a.nav-item {
  display: block;
  position: relative;
  z-index: 0;
  height: var(--nav-h);
  line-height: var(--nav-h);
  padding: 0 20px;
  color: var(--text-nav);
  font-size: 15px;
  white-space: nowrap;
  text-decoration: none;
}
a.nav-item::before {
  display: block;
  position: absolute;
  content: "";
  top: 0; bottom: 0; left: 0; right: 0;
  z-index: -1;
  transform-style: preserve-3d;
  transform: rotateX(-70deg);
  transition: all 0.2s linear;
  opacity: 0;
}
a.nav-item:hover,
a.nav-item.is-active { color: var(--text-white); text-decoration: none; text-shadow: 0 1px 1px rgba(23, 23, 23, 0.76); }
a.nav-item:hover::before {
  background: rgba(38, 38, 38, 0.76);
  box-shadow: inset 0 8px 12px -2px rgba(20, 20, 20, 0.76);
  transform: rotateX(0deg);
  opacity: 1;
}

/* Conteneur dropdown */
.has-dropdown {
  position: relative;
  height: var(--nav-h);
  display: flex;
  align-items: stretch;
}
.has-dropdown::before {
  display: block;
  position: absolute;
  content: "";
  top: 0; bottom: 0; left: 0; right: 0;
  z-index: 1;
  transform-style: preserve-3d;
  transform: rotateX(-70deg);
  transition: all 0.2s linear;
  opacity: 0;
}
.has-dropdown:hover::before {
  background: rgba(38, 38, 38, 0.76);
  box-shadow: inset 0 8px 12px -2px rgba(20, 20, 20, 0.76);
  transform: rotateX(0deg);
  opacity: 1;
}
.has-dropdown > a,
.has-dropdown > .nav-heading {
  display: block;
  position: relative;
  z-index: 2;
  height: var(--nav-h);
  line-height: var(--nav-h);
  padding: 0 20px;
  color: var(--text-nav);
  font-size: 15px;
  white-space: nowrap;
  text-decoration: none;
  cursor: default;
  user-select: none;
}
.has-dropdown > a:hover,
.has-dropdown:hover > .nav-heading,
.has-dropdown.is-active > a { color: var(--text-white); text-decoration: none; text-shadow: 0 1px 1px rgba(23, 23, 23, 0.76); }

@keyframes navFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1020;
  min-width: 220px;
  padding: 10px 0;
  margin: 0;
  list-style: none;
  background: rgba(38, 38, 38, 0.76);
  animation: navFadeIn 0.15s ease-in-out;
}
.has-dropdown:hover .dropdown { display: block; }

.dropdown li a {
  display: block;
  padding: 7px 20px;
  color: var(--text);
  font-size: 15px;
  line-height: 20px;
  text-decoration: none;
  white-space: nowrap;
}
.dropdown li a:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.nav-separator {
  padding: 6px 20px 2px;
  margin-top: 6px;
  border-top: 1px solid var(--border-faint);
}
.nav-separator:first-child { border-top: none; margin-top: 0; }
.nav-separator span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-white);
}

/* ── Mise en page — grille main + sidebar ───────────────────────────────── */
.tm-middle {
  max-width: var(--max-w);
  margin: 20px auto;
  padding: 0 20px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.tm-main  { flex: 0 0 75%; min-width: 0; }
.tm-sidebar-a { flex: 0 0 calc(25% - 20px); min-width: 0; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.tm-footer {
  max-width: var(--max-w);
  margin: 20px auto;
  padding: 20px 20px 0;
  border-top: 2px solid var(--border-faint);
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
.tm-footer a       { color: var(--text); }
.tm-footer a:hover { color: var(--text-white); text-decoration: none; }
.tm-footer-nav { margin-bottom: 16px; }
.tm-footer-nav a { margin: 0 8px; }
.tm-strava { margin: 20px 0 16px; }
.tm-strava iframe { max-width: 100%; border: 0; }

/* ── Panneau sidebar ────────────────────────────────────────────────────── */
.uk-panel {
  margin-bottom: 20px;
  font-size: 15px;
  line-height: 22px;
}
.uk-panel-box {
  padding: 20px;
  background: var(--bg-panel);
}
.uk-panel-box-secondary {
  background: var(--bg-nav);
  box-shadow: inset 0 0 40px #33373e;
}
.uk-panel-box-third {
  background: var(--bg-panel-alt);
  padding: 10px;
}
.uk-panel-box-primary {
  background: var(--bg-panel-pri);
  color: #ffffff;
  box-shadow: inset 0 0 40px #3575a6;
  text-shadow: 0 1px 1px #3778aa;
  padding: 10px;
  min-height: 101px;
}
.uk-panel-box-primary .uk-panel-title { color: #ffffff; }
.uk-panel-box-primary a       { color: #ffffff; }
.uk-panel-box-primary a:hover { color: #0c1b27; }
.uk-panel-title {
  margin: 0 0 20px;
  font-size: 28px;
  line-height: 34px;
  font-weight: 300;
  text-transform: none;
  color: #d7d7d9;
}

/* ── Nav latérale sidebar — couleurs exactes yoo_moreno G9blue ────────────── */
.uk-nav-side { list-style: none; padding: 0; margin: 0; }
.uk-nav-side > li > a {
  display: block;
  padding: 5px 15px;
  color: #989ca7;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.1s ease-in-out;
}
.uk-nav-side > li > a:hover,
.uk-nav-side > li > a:focus {
  background: #2d3035;
  color: #989ca7;
  outline: none;
  text-decoration: none;
}
/* Item actif top-niveau — fond sombre #2b2b2c */
.uk-nav-side > li.uk-active > a {
  background: #2b2b2c;
  color: #ffffff;
}

/* ── Accordéon sidebar ────────────────────────────────────────────────────── */
/* Sous-menu caché par défaut, visible quand uk-open */
.g9-sidebar-nav .uk-nav-sub {
  display: none;
  list-style: none;
  padding: 5px 0 5px 15px;
  margin: 0;
}
.g9-sidebar-nav .uk-parent.uk-open > .uk-nav-sub { display: block; }

/* Icône ‹ (= fa-angle-left \f104) → rotate -90° quand ouvert (= fa-angle-down \f107) */
.g9-sidebar-nav .uk-parent > a::after {
  content: "\2039";
  display: inline-block;
  width: 22px;
  margin-right: -10px;
  float: right;
  text-align: center;
  font-size: 16px;
  line-height: 1.4;
  transition: transform 0.1s ease-in-out;
}
.g9-sidebar-nav .uk-parent.uk-open > a::after { transform: rotate(-90deg); }

/* Liens des sous-items — orange comme les autres liens du site */
.g9-sidebar-nav .uk-nav-sub > li > a {
  display: block;
  padding: 5px 0;
  color: var(--link);
  font-size: 15px;
  text-decoration: none;
}
.g9-sidebar-nav .uk-nav-sub > li > a:hover { color: var(--link-hover); }

/* Bullet ▸ (= fa-caret-right \f0da) masqué → visible au hover */
.g9-sidebar-nav .uk-nav-sub > li > a::before {
  content: "\25B8";
  font-size: 8px;
  width: 10px;
  margin-left: -10px;
  float: left;
  overflow: hidden;
  text-indent: -20px;
  transition: text-indent 0.1s ease-in-out;
}
.g9-sidebar-nav .uk-nav-sub > li > a:hover::before { text-indent: 0; }

/* Sous-item actif — texte blanc */
.g9-sidebar-nav .uk-nav-sub > li.uk-active > a { color: #ffffff; }

/* En-têtes de section (séparateurs) dans les sous-menus */
.g9-sidebar-nav .uk-nav-header {
  padding: 5px 0 2px 0;
  text-transform: uppercase;
  font-weight: bold;
  font-size: 11px;
  color: #989ca7;
}

/* Encart "Ailleurs" — structure uk-list (fidèle à l'original) */
.tm-ailleurs-list { list-style: none; padding: 0; margin: 0; }
.tm-ailleurs-list li { margin-bottom: 14px; }
.tm-ailleurs-list li:last-child { margin-bottom: 0; }
.tm-ailleurs-item { overflow: hidden; }
.tm-ailleurs-thumb {
  float: left;
  margin: 0 10px 4px 0;
}
.tm-ailleurs-thumb img { border-radius: 3px; display: block; }
.tm-ailleurs .uk-h5 {
  margin: 0 0 2px;
  font-size: 15px;
  line-height: 22px;
  font-weight: 300;
}
.tm-ailleurs .uk-h5 a { color: var(--link); text-decoration: none; }
.tm-ailleurs .uk-h5 a:hover { color: var(--link-hover); text-decoration: underline; }
/* Sous-texte grisé — valeur DevTools originale #7B7D82, 14px */
.tm-ailleurs-meta {
  font-size: 14px;
  line-height: 21px;
  color: #7b7d82;
  margin: 0;
}

/* ── Fil d'Ariane ───────────────────────────────────────────────────────── */
nav[aria-label="Fil d'Ariane"] {
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg);
  padding: 6px 0;
}
nav[aria-label="Fil d'Ariane"] a { color: var(--text); }
nav[aria-label="Fil d'Ariane"] a:hover { color: var(--text-white); }

/* ── Grille 2 colonnes articles ─────────────────────────────────────────── */
.article-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* ── Article (liste catégorie + home) ───────────────────────────────────── */
.uk-article {
  /* Pas de fond : repose sur #2b2c30 */
  padding-bottom: 20px;
}

/* Image cliquable en haut */
.uk-article > a > img,
.uk-article > a img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 10px;
}

/* Bloc date — flotte à gauche du titre */
.tm-article-date {
  float: left;
  max-width: 80px;
  margin-top: 5px;
  margin-right: 20px;
  padding-right: 20px;
  border-right: 2px solid var(--border-faint);
  color: var(--text-muted);
  line-height: 1.2;
}
.tm-article-date-day  { display: block; font-size: 15px; }
.tm-article-date-year { display: block; font-size: 22px; }

/* Titre — overflow:hidden pour former un BFC à côté du float */
.uk-article-title {
  overflow: hidden;
  font-size: 34px;
  line-height: 38px;
  font-weight: 300;
  margin: 0 0 8px;
}
.uk-article-title a { color: var(--text-white); text-decoration: none; }
.uk-article-title a:hover { color: var(--accent); text-decoration: none; }

/* Meta (catégorie, auteur) */
.uk-article-meta {
  clear: both;
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 10px;
}
.uk-article-meta a { color: var(--text-muted); }
.uk-article-meta a:hover { color: var(--accent); text-decoration: underline; }

/* Extrait */
.uk-article > div { font-size: 15px; line-height: 22px; }

/* Bouton "Lire la suite" */
.uk-button {
  display: inline-block;
  padding: 4px 14px;
  background: var(--bg-nav);
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 10px;
}
.uk-button:hover {
  background: var(--link);
  color: var(--text-white);
  border-color: var(--link);
  text-decoration: none;
}

/* ── Page article (vue détail) ──────────────────────────────────────────── */
.article-detail { }

.article-detail .uk-article-title { font-size: 34px; line-height: 38px; }

.article-detail figure { margin: 0 0 20px; }
.article-detail figure img { width: 100%; height: auto; }

.article-body { font-size: 15px; line-height: 24px; }
.article-body img   { max-width: 100%; height: auto; }
.article-body table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.article-body td, .article-body th { padding: 6px 10px; border: 1px solid var(--border-faint); }
.article-body blockquote {
  border-left: 3px solid var(--link);
  padding-left: 16px;
  margin: 16px 0;
  color: var(--text-muted);
}

/* Liens et typographie dans le corps des articles */
.article-body a         { color: var(--link); text-decoration: none; }
.article-body a:hover   { color: var(--link-hover); text-decoration: underline; }
.article-body strong    { color: var(--text-white); font-weight: 700; }
.article-body em        { color: inherit; font-style: italic; }

/* Style G9 — questions : couleur #b3810e / bold / 18px (ancien site : lien #b3810e, corps 18px) */
.article-body p > strong:only-child,
.article-body p > a:only-child > strong:only-child {
  color: var(--link);
  font-size: 18px;
  font-weight: 700;
  display: block;
  margin-top: 18px;
}
/* Force les <strong> imbriqués (artefacts Joomla) à hériter la couleur du parent */
.article-body p > strong:only-child strong {
  color: inherit;
}
/* Titres de questions <h4> dans le corps des articles */
.article-body h4 {
  color: var(--link);
  font-size: 18px;
  font-weight: 700;
  margin-top: 20px;
}

/* ── Liste catégorie (vue liste) ────────────────────────────────────────── */
.article-item {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-faint);
  margin-bottom: 20px;
}
.article-item:last-child { border-bottom: none; }
.article-item .uk-article-title { font-size: 22px; line-height: 26px; }

.article-excerpt { font-size: 15px; line-height: 22px; color: var(--text); }

/* Pagination */
nav[aria-label="Pagination"] {
  margin-top: 20px;
  text-align: center;
  font-size: 15px;
  clear: both;
}
nav[aria-label="Pagination"] a {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-panel);
  color: var(--text);
  margin: 0 4px;
}
nav[aria-label="Pagination"] a:hover {
  background: #33373e;
  color: var(--text-white);
  text-decoration: none;
}
nav[aria-label="Pagination"] span { color: var(--text-muted); margin: 0 8px; }

/* ── Slideshow home ─────────────────────────────────────────────────────── */
.home-slideshow-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}
.home-slideshow {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111;
}
.home-slideshow img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  max-width: none;
  max-height: none;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}
.home-slideshow img.is-active { opacity: 1; }

.slideshow-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}
.slideshow-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.8);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}
.slideshow-dot.is-active { background: #fff; }
.slideshow-dot:hover     { background: rgba(255,255,255,0.5); }

/* ── Home ───────────────────────────────────────────────────────────────── */
.home-articles h2 { margin-bottom: 20px; }

/* Encarts présentation (2 colonnes, pleine largeur conteneur — avant .tm-middle) */
.tm-top-b {
  max-width: var(--max-w);
  margin: 20px auto 0;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
/* Police des encarts tm-top-b : taille corps (15px) comme dans le site d'origine */
.tm-top-b .uk-panel { font-size: 15px; line-height: 22px; }

/* Encarts bas de page (4 colonnes, pleine largeur) */
.tm-bottom-a {
  max-width: var(--max-w);
  margin: 0 auto 20px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* Barre partenaires (pleine largeur) */
.tm-bottom-b {
  max-width: var(--max-w);
  margin: 0 auto 20px;
  padding: 0 20px;
}
.tm-bottom-b .uk-panel-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.tm-bottom-b img { height: 57px; width: auto; max-width: none; }

/* Contenu centré dans un panneau */
.panel-center { text-align: center; }
.panel-center img { max-width: 100%; height: auto; }
.panel-center .uk-text-muted { margin-top: 8px; font-size: 13px; }

/* uk-text-muted */
.uk-text-muted { color: var(--text-muted); }

/* ── 404 ────────────────────────────────────────────────────────────────── */
.error-404 { text-align: center; padding: 60px 20px; }
.error-404 h1 { font-size: 80px; color: var(--text-muted); margin-bottom: 10px; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  body { word-wrap: break-word; hyphens: auto; }

  .tm-navbar .uk-container {
    flex-wrap: wrap;
    height: auto;
    padding: 0;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    cursor: pointer;
    color: var(--text);
    font-size: 22px;
    background: none;
    border: none;
    padding: 0;
    flex-shrink: 0;
    margin-left: auto;
  }
  .nav-toggle:hover { color: var(--text-white); }

  a.nav-item,
  .has-dropdown { display: none; }

  .nav-mobile-items {
    display: none;
    width: 100%;
    flex-direction: column;
    background: var(--bg-nav);
    padding: 8px 0 16px;
  }
  .nav-mobile-items.is-open { display: flex; }

  .nav-mobile-items a {
    display: block;
    padding: 8px 20px;
    color: var(--text);
    font-size: 15px;
    text-decoration: none;
  }
  .nav-mobile-items a:hover { color: var(--text-white); background: rgba(255,255,255,0.05); }

  .nav-mobile-items .mobile-group-label {
    display: block;
    padding: 10px 20px 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-white);
    margin-top: 8px;
    border-top: 1px solid var(--border-faint);
  }
  .nav-mobile-items .mobile-group-label:first-child { border-top: none; margin-top: 0; }
  .nav-mobile-items .mobile-sub { list-style: none; padding: 0; margin: 0; }
  .nav-mobile-items .mobile-sub a { padding-left: 36px; font-size: 15px; }

  /* Layout mobile : colonne unique */
  .tm-middle { flex-direction: column; padding: 0 16px; }
  .home-slideshow-wrap { padding: 0 16px; }
  .tm-top-b            { padding: 0 16px; }
  .tm-main, .tm-sidebar-a { flex: none; width: 100%; }
  .tm-sidebar-a { order: 2; }

  .article-grid { grid-template-columns: 1fr; }

  .tm-top-b      { grid-template-columns: 1fr; }
  .tm-bottom-a   { grid-template-columns: 1fr 1fr; }
  .tm-bottom-b .uk-panel-box { gap: 20px; }

  h1 { font-size: 26px; line-height: 30px; }
  .uk-article-title { font-size: 20px; line-height: 24px; }

  /* Galerie : réduire les vignettes pour éviter le débordement horizontal */
  .article-gallery img { height: 80px; }
  .g9-galerie-page img { height: 130px; }

  /* Tables Joomla : scroll horizontal si contenu non-wrappable */
  .article-body table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (min-width: 768px) {
  .nav-toggle       { display: none; }
  .nav-mobile-items { display: none !important; }
}

@media (min-width: 1220px) {
  :root { --max-w: 1240px; }
  .uk-container       { padding: 0 30px; }
  .tm-middle          { padding: 0 30px; }
  .home-slideshow-wrap { padding: 0 30px; }
  .tm-top-b           { padding: 0 30px; }
  .tm-bottom-a        { padding: 0 30px; }
  .tm-bottom-b        { padding: 0 30px; }
}

/* ── Lightbox ───────────────────────────────────────────────────────────── */

/* overlay */
#g9-lb-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(119,119,119,.7);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s;
}
#g9-lb-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* boîte image */
#g9-lb-wrap {
  position: fixed;
  z-index: 1101;
  padding: 10px;
  background: #fff;
  box-shadow: 0 0 15px #555;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s;
  box-sizing: border-box;
}
#g9-lb-wrap.is-open {
  opacity: 1;
  visibility: visible;
}
#g9-lb-wrap img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  cursor: pointer;
  border: none;
}

/* bouton fermer */
#g9-lb-close {
  position: absolute;
  top: -17px; right: -17px;
  width: 34px; height: 34px;
  background: url('/images/lightbox-close.png') center/contain no-repeat, #333;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  font-size: 20px;
  line-height: 34px;
  text-align: center;
  padding: 0;
  z-index: 1102;
}

/* titre flottant */
#g9-lb-title {
  position: absolute;
  left: 0; bottom: -20px;
  padding: 4px 10px;
  background: rgba(0,0,0,.7);
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  border-radius: 0 0 4px 4px;
  max-width: 100%;
  box-sizing: border-box;
  display: none;
}

/* ── Galeries articles + photos isolées (vignettes unifiées) ─────── */
.article-gallery {
  margin: 0 -15px -15px 0;
  overflow: hidden;
}
.article-gallery::after,
.article-body::after {
  content: '';
  display: table;
  clear: both;
}

/* Cosmétique commune : bords arrondis, cursor, transition, survol */
.article-gallery a,
.g9-thumb {
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.1s ease-out;
  cursor: zoom-in;
}
.article-gallery a:hover,
.g9-thumb:hover {
  box-shadow: 8px 8px 15px rgba(0,0,0,.4);
  transform: scale(1.05);
}

/* Galerie : layout wall (float, dimensions, marges) */
.article-gallery a {
  display: block;
  float: left;
  position: relative;
  margin: 0 15px 15px 0;
}
.article-gallery a:hover {
  z-index: 10;
  transform: scale(1.2);
}
.article-gallery img {
  display: block;
  height: 120px;
  width: auto;
  max-width: none;
  border-radius: 10px;
}

/* Photo isolée : inline-block pour activer overflow:hidden, sans contrainte de layout */
.g9-thumb { display: inline-block; }
.g9-thumb img { border-radius: 10px; }

/* boutons prev / next lightbox */
#g9-lb-prev,
#g9-lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 60px;
  background: rgba(0,0,0,.55);
  border: none;
  border-radius: 4px;
  color: #fff;
  font-size: 28px;
  line-height: 60px;
  text-align: center;
  cursor: pointer;
  padding: 0;
  z-index: 1102;
  display: none;
}
#g9-lb-prev { left: -50px; }
#g9-lb-next { right: -50px; }
#g9-lb-prev:hover,
#g9-lb-next:hover { background: rgba(0,0,0,.8); }

/* ── Section Cofactory ──────────────────────────────────────────────────── */
.cofactory-intro { color: var(--link); margin-bottom: 20px; }
.cofactory-intro a { color: var(--link); }
.cofactory-intro p { margin-bottom: 8px; }

/* ── Introduction de catégorie (archives, etc.) ─────────────────────────── */
.category-intro { color: var(--text); margin-bottom: 20px; font-style: italic; }
.category-intro a { color: var(--link); }
.category-intro p { margin-bottom: 8px; }

.cofactory-partners { list-style: none; padding: 0; margin: 0; }
.cofactory-partners li { padding: 10px 0; border-bottom: 1px solid var(--border-faint); }
.cofactory-partners li:last-child { border-bottom: none; }

.partner-item-centered { text-align: center; }
.partner-item-centered img {
  display: block;
  margin: 0 auto 8px;
  max-width: 100%;
  height: auto;
}
.partner-item-centered h4 {
  font-size: 13px;
  font-weight: normal;
  margin: 0;
  text-align: center;
  color: var(--text-white);
}

/* ── Page Contact ───────────────────────────────────────────────────────── */
.contact-info-panel,
.contact-hours-panel,
.contact-form-panel  { margin-bottom: 20px; }

.contact-info-panel .uk-panel-title {
  font-size: 28px;
  line-height: 34px;
  font-weight: 300;
  text-transform: none;
}

.contact-coords {
  list-style: none;
  padding: 0;
  margin: 0;
}
.contact-coords li   { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.contact-coords li:last-child { margin-bottom: 0; }
.contact-icon        { font-style: normal; flex-shrink: 0; }

.uk-text-warning { color: #eb8541 !important; }

/* Formulaire */

.contact-alert {
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  font-size: 15px;
}
.contact-alert ul  { margin: 0; padding-left: 1.2em; }
.contact-alert-success { background: rgba(60, 130, 60, 0.3); border-left: 3px solid #5cb85c; color: #a8d5a8; }
.contact-alert-error   { background: rgba(160, 50, 50, 0.3); border-left: 3px solid #d9534f; color: #e8a8a8; }

.contact-form { display: flex; flex-direction: column; gap: 16px; }

.contact-field { display: flex; flex-direction: column; gap: 6px; }

.contact-field label {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.contact-required { color: var(--accent); }

.contact-field input,
.contact-field textarea {
  background: var(--bg-panel-alt);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  color: var(--text);
  font-family: 'Lato', sans-serif;
  font-size: 15px;
  font-weight: 300;
  padding: 9px 12px;
  transition: border-color 0.2s;
  width: 100%;
}
.contact-field input:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: var(--bg-panel-pri);
}
.contact-field textarea { resize: vertical; }

.contact-submit { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.contact-btn {
  background: var(--bg-panel-pri);
  border: none;
  border-radius: 3px;
  color: #fff;
  cursor: pointer;
  font-family: 'Lato', sans-serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.04em;
  padding: 10px 24px;
  text-transform: uppercase;
  transition: background 0.2s;
}
.contact-btn:hover { background: #3a7ab5; }

.contact-hint { color: var(--text-muted); font-size: 12px; }

/* Honeypot — masqué visuellement et pour les lecteurs d'écran */
.contact-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ── Page Galerie Photos (/galerie) ──────────────────────────────────────── */

/* Modificateur de .article-gallery : vignettes plus grandes */
.g9-galerie-page a   { margin: 0 12px 12px 0; }
.g9-galerie-page img { height: 200px; width: auto; }

/* Barre de filtres par tag */
.g9-gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.g9-gallery-filter-btn {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--border, #3a3b40);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-muted, #9ba3b2);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.g9-gallery-filter-btn:hover,
.g9-gallery-filter-btn.is-active {
  background: var(--bg-panel-pri, #2f6792);
  color: #fff;
  border-color: var(--bg-panel-pri, #2f6792);
}

/* Compteur */
.g9-gallery-count {
  font-size: 13px;
  color: var(--text-muted, #9ba3b2);
  margin: 0 0 20px;
}

/* Pagination */
.g9-gallery-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 24px 0 8px;
  align-items: center;
}
.g9-pag-btn {
  display: inline-block;
  min-width: 34px;
  padding: 5px 10px;
  border: 1px solid var(--border, #3a3b40);
  border-radius: 4px;
  font-size: 13px;
  text-align: center;
  color: var(--text-muted, #9ba3b2);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.g9-pag-btn:hover {
  background: var(--bg-hover, #2e3038);
  color: #e0e3ea;
}
.g9-pag-btn.is-active {
  background: var(--bg-panel-pri, #2f6792);
  color: #fff;
  border-color: var(--bg-panel-pri, #2f6792);
  pointer-events: none;
}
.g9-pag-ellipsis {
  color: var(--text-muted, #9ba3b2);
  padding: 0 4px;
}
