:root{
  --primary:#2563eb;
  --secondary:#111827;

  /* Couleurs “on” (texte lisible sur primary/secondary). Peut être surchargé en inline. */
  --on-primary-rgb: 255 255 255;
  --on-secondary-rgb: 255 255 255;

  --radius: 18px;
  --font: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  /* Base tokens (utilisés par les thèmes) */
  --ink: var(--secondary);
  --muted: rgba(15,23,42,.72);
  --border: rgba(15,23,42,.12);
  --bg: #ffffff;
  --bg-soft: #f6f7fb;

  --shadow-sm: 0 10px 28px rgba(2,6,23,.08);
  --shadow: 0 24px 70px rgba(2,6,23,.18);

  --container: 1180px;
  --header-h: 78px;
  --section-pad: 34px;
  
    /* ===== Logo (Brand) : réglages globaux, surchargeables par thème ===== */
  --brand-logo-size: 64px;          /* taille par défaut (augmente/diminue) */
  --brand-logo-radius: 14px;        /* 0px = carré / 999px = rond */
  --brand-logo-bg: transparent;     /* "sans fond" */
  --brand-logo-border-w: 0px;       /* 0 = pas de bordure */
  --brand-logo-border-color: var(--border);
  --brand-logo-shadow: none;        /* none = pas d'ombre */
  --brand-offset-x: 0px;            /* position: droite (+) / gauche (-) */
  --brand-offset-y: 0px;            /* position: bas (+) / haut (-) */

}

*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg-soft);
}

a{ color: inherit; }

.container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* Boutons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.5rem;
  padding: .82rem 1.1rem;
  border-radius: calc(var(--radius) - 6px);
  border: 1px solid transparent;
  text-decoration:none;
  font-weight: 800;
  cursor:pointer;
  user-select:none;
  background: var(--primary);
  color: rgb(var(--on-primary-rgb));
  box-shadow: 0 10px 30px rgba(2,6,23,.10);
  transition: transform .12s ease, filter .12s ease, background .12s ease, border-color .12s ease;
}
.btn:hover{ transform: translateY(-1px); filter: brightness(0.98); }
.btn:active{ transform: translateY(0); }

.btn.outline,
.btn.secondary{
  background: transparent;
  color: var(--ink);
  border-color: rgba(15,23,42,.18);
  box-shadow: none;
}
.btn.outline:hover,
.btn.secondary:hover{ background: rgba(15,23,42,.05); }

/* Header */
.site-header{
  position: sticky;
  top:0;
  z-index: 60;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.site-header__inner,
.header-inner{
  display:flex;
  align-items:center;
  justify-content:flex-start; /* au lieu de space-between */
  gap: 16px;
  height: var(--header-h);
}

/* pousse tout ce qui suit à droite */
.brand{ margin-right:auto; }

/* si nav + burger visibles ensemble, on force l'ordre : liens puis burger */
.site-nav{ order: 2; }
.nav-toggle{ order: 3; }


.brand{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 0;        /* au lieu de 240px */
  flex: 0 1 auto;      /* autorise la réduction */
  text-decoration:none;
}
.brand-logo{
  width: var(--brand-logo-size, 44px);
  height: var(--brand-logo-size, 44px);
  border-radius: var(--brand-logo-radius, 14px);
  object-fit: contain;

  /* "sans fond" + bordure optionnelle */
  background: var(--brand-logo-bg, transparent);
  border: var(--brand-logo-border-w, 0px) solid var(--brand-logo-border-color, var(--border));

  /* ombre optionnelle */
  box-shadow: var(--brand-logo-shadow, none);

  /* décalage optionnel (position) */
  transform: translate(var(--brand-offset-x, 0px), var(--brand-offset-y, 0px));
}

.brand-logo--ph{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  letter-spacing: .02em;
  color: var(--ink);
  background: #f1f5f9;
}
.brand-title,
.brand-name{
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: 18px;
  min-width: 0;
  max-width: clamp(160px, 22vw, 380px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-nav{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
}
.site-nav a{
  display:inline-flex;
  align-items:center;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration:none;
  font-weight: 750;
  font-size: 14px;
  color: inherit;
  transition: background .12s ease, box-shadow .12s ease;
}

.nav-toggle{
  display:none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.88);
  cursor:pointer;
}
/* Jamais visible par défaut (desktop inclus) */
.site-nav .nav-social{ display:none !important; }

@media (max-width: 880px){
  .nav-toggle{ display:inline-flex; align-items:center; justify-content:center; }
  .site-nav{ display:none; }
  .site-header.is-open .site-nav{
  display:flex;
  position:absolute;
  left: 20px;
  right: 20px;
  top: calc(var(--header-h) + 10px);
  padding: 14px;
  border-radius: 18px;

  /* IMPORTANT : menu lisible sur tous les thèmes */
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 10px;

  background: var(--secondary);
  color: rgb(var(--on-secondary-rgb));
  border: 1px solid rgba(var(--on-secondary-rgb), .18);
  box-shadow: var(--shadow-sm);

  max-height: calc(100svh - var(--header-h) - 24px);
  overflow: auto;
}
/* Priority+ : en mobile, la colonne doit s'appliquer au wrapper */
.site-header.is-open .site-nav .nav-primary{
  display:flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

/* le bouton "+" ne sert pas en mobile (on veut le burger normal) */
.site-header.is-open .site-nav .nav-more{ display:none !important; }

 .site-header.is-open .site-nav a{
  width:100%;
  justify-content:flex-start;
  border-radius: 14px;
  background: rgba(var(--on-secondary-rgb), .10);
  border: 1px solid rgba(var(--on-secondary-rgb), .14);
  color: inherit;
}
.site-header.is-open .site-nav a:hover{
  background: rgba(var(--on-secondary-rgb), .16);
}



}
/* ===== Priority+ (desktop) : empêche le wrap pour que le JS puisse retirer des liens ===== */
@media (min-width: 881px){
  html.has-priority-nav .site-nav{
    flex-wrap: nowrap !important;
    min-width: 0;
  }

  html.has-priority-nav .site-nav .nav-primary{
    display:flex !important;
    align-items:center;
    gap: 10px;
    flex-wrap: nowrap !important;
    overflow: hidden;
    min-width: 0;
  }

  html.has-priority-nav .site-nav .nav-primary a{
    flex: 0 0 auto;
    white-space: nowrap;
  }

  html.has-priority-nav .site-nav .nav-more{
    flex: 0 0 auto;
  }
}

/* Hero */
.home-hero{
  position: relative;
  overflow: hidden;
  background: #0b1220;

  /* Full page (avec garde-fou) */
  min-height: clamp(var(--hero-min, 560px), calc(100svh - var(--header-h, 78px)), var(--hero-max, 1100px));
}
.hero-img,
.hero-media{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit: cover;
  transform: scale(1.04);
}
.hero-overlay{
  position:absolute;
  inset:0;
  background:
    radial-gradient(900px 600px at 20% 25%, rgba(0,0,0,.18), transparent 60%),
    linear-gradient(90deg, rgba(2,6,23,.60), rgba(2,6,23,.10));
}
.hero-content{
  position: relative;
  min-height: inherit;
  display:flex;
  align-items:center;
  padding: 34px 0;
}
.hero-panel{
  max-width: 760px;
  width: 100%;
}
.hero-panel.is-card{
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 26px 26px;
}
.hero-kicker{
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 900;
  font-size: 12px;
  color: rgba(2,6,23,.62);
  margin-bottom: 10px;
}
.hero-title{
  margin: 0 0 10px 0;
  font-size: clamp(34px, 4.2vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.hero-text{
  margin: 0 0 18px 0;
  font-size: 16px;
  color: rgba(2,6,23,.72);
}
.hero-actions,
.hero-ctas{
 /* display:flex;*/
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 580px){
  .hero-panel.is-card{ padding: 18px; }
  .hero-actions .btn{ width: 100%; }
}

/* =====================================================================
   Options Héro (position du texte)
   - .hero-pos-overlay : texte sur l'image + options (align/hauteur/fond du texte)
   - .hero-pos-below   : texte sous l'image (style fixe, sans réglages)
   NOTE: on vise un ancêtre [class*="theme-"] pour battre la cascade des thèmes.
   ===================================================================== */

/* ----- Mode: texte sur l'image ----- */


[class*="theme-"] .home-hero.hero-pos-overlay .hero-img,
[class*="theme-"] .home-hero.hero-pos-overlay .hero-media{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  transform: scale(1.04);
}

[class*="theme-"] .home-hero.hero-pos-overlay .hero-overlay{
  display:none !important;
  background:none !important;
}

[class*="theme-"] .home-hero.hero-pos-overlay .hero-content{
  position: relative;
  min-height: inherit;
  display:flex;
  padding: 34px 0;
}

/* Hauteur du contenu */
[class*="theme-"] .home-hero.hero-pos-overlay.hero-v-top .hero-content{ align-items:flex-start; }
[class*="theme-"] .home-hero.hero-pos-overlay.hero-v-middle .hero-content{ align-items:center; }
[class*="theme-"] .home-hero.hero-pos-overlay.hero-v-bottom .hero-content{ align-items:flex-end; }

/* Alignement horizontal */
[class*="theme-"] .home-hero.hero-pos-overlay.hero-align-left .hero-panel{ margin-left:0; margin-right:auto; text-align:left; }
[class*="theme-"] .home-hero.hero-pos-overlay.hero-align-center .hero-panel{ margin-left:auto; margin-right:auto; text-align:center; }
[class*="theme-"] .home-hero.hero-pos-overlay.hero-align-right .hero-panel{ margin-left:auto; margin-right:0; text-align:right; }

[class*="theme-"] .home-hero.hero-pos-overlay.hero-align-left .hero-actions{ justify-content:flex-start; }
[class*="theme-"] .home-hero.hero-pos-overlay.hero-align-center .hero-actions{ justify-content:center; }
[class*="theme-"] .home-hero.hero-pos-overlay.hero-align-right .hero-actions{ justify-content:flex-end; }

/* Fond du texte */
[class*="theme-"] .home-hero.hero-pos-overlay.hero-contrast-none .hero-panel.is-card{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
[class*="theme-"] .home-hero.hero-pos-overlay.hero-contrast-very-light .hero-panel.is-card{
  background: rgba(255,255,255,.62);
  box-shadow: 0 12px 28px rgba(2,6,23,.07);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
[class*="theme-"] .home-hero.hero-pos-overlay.hero-contrast-light .hero-panel.is-card,
[class*="theme-"] .home-hero.hero-pos-overlay.hero-contrast-soft .hero-panel.is-card{
  background: rgba(255,255,255,.78);
  box-shadow: 0 16px 36px rgba(2,6,23,.10);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
[class*="theme-"] .home-hero.hero-pos-overlay.hero-contrast-medium .hero-panel.is-card{
  background: rgba(255,255,255,.88);
  box-shadow: 0 18px 42px rgba(2,6,23,.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
[class*="theme-"] .home-hero.hero-pos-overlay.hero-contrast-strong .hero-panel.is-card{
  background: rgba(255,255,255,.96);
  box-shadow: 0 24px 58px rgba(2,6,23,.22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ----- Mode: texte sous l'image (style fixe) ----- */
[class*="theme-"] .home-hero.hero-pos-below{
  overflow: hidden;
  min-height: auto;
  background: #fff;
}

[class*="theme-"] .home-hero.hero-pos-below .hero-img,
[class*="theme-"] .home-hero.hero-pos-below .hero-media{
  position: relative;
  inset: auto;
  width: 100%;
  height: var(--hero-h, clamp(360px, 55svh, 720px));
  object-fit: cover;
  transform: none;
  display: block;
}

[class*="theme-"] .home-hero.hero-pos-below .hero-overlay{ display:none; }

[class*="theme-"] .home-hero.hero-pos-below .hero-content{
  min-height: auto;
  display:block;
  padding: 14px 0 var(--section-pad) 0;
}

[class*="theme-"] .home-hero.hero-pos-below .hero-panel{ max-width: 860px; margin: 0 auto; }

[class*="theme-"] .home-hero.hero-pos-below .hero-panel.is-card{
  background: var(--secondary);
  border: 1px solid rgba(var(--on-secondary-rgb), .18);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
  padding: 26px 26px;
  text-align:center;
  color: rgba(var(--on-secondary-rgb), .94);
}

[class*="theme-"] .home-hero.hero-pos-below .hero-kicker{ color: rgba(var(--on-secondary-rgb), .78); }
[class*="theme-"] .home-hero.hero-pos-below .hero-title{ color: var(--primary); }
[class*="theme-"] .home-hero.hero-pos-below .hero-text{ color: rgba(var(--on-secondary-rgb), .94); }

[class*="theme-"] .home-hero.hero-pos-below .hero-actions{ justify-content:center; }
[class*="theme-"] .home-hero.hero-pos-below .hero-actions .btn.secondary{
  background: transparent;
  color: rgba(var(--on-secondary-rgb), .96);
  border-color: rgba(var(--on-secondary-rgb), .28);
}

[class*="theme-"] .hero-below{
  position:relative;
  z-index:3;
  width:min(calc(100% - 32px), var(--container));
  margin:clamp(-52px, -4vw, -28px) auto clamp(30px, 4.5vw, 64px);
  padding:0 !important;
  background:transparent !important;
  color:var(--text, #172033) !important;
  text-align:center;
}

[class*="theme-"] .hero-below__inner{
  position:relative;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  padding:clamp(22px, 3vw, 36px) clamp(20px, 4vw, 56px);
  background:
    radial-gradient(circle at 18% 0, rgb(var(--primary-rgb) / .10), transparent 38%),
    linear-gradient(135deg, #fff, rgb(var(--primary-rgb) / .045));
  border:1px solid rgb(var(--secondary-rgb, 15 23 42) / .10);
  border-top:4px solid rgb(var(--primary-rgb) / .82);
  border-radius:calc(var(--radius, 18px) + 8px);
  box-shadow:0 22px 58px rgb(15 23 42 / .12);
}

[class*="theme-"] .hero-below .hero-kicker{
  margin:0;
  color:var(--primary);
  font-size:12px;
  font-weight:950;
  letter-spacing:.18em;
  text-transform:uppercase;
}

[class*="theme-"] .hero-below .hero-title{
  margin:0;
  max-width:100%;
  color:var(--secondary);
  font-size:clamp(30px, 4.2vw, 58px);
  line-height:1.02;
  letter-spacing:-.045em;
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
}

[class*="theme-"] .hero-below .hero-text{
  margin:0;
  max-width:74ch;
  color:rgb(var(--secondary-rgb, 15 23 42) / .78);
  font-size:clamp(15px, 1.15vw, 19px);
  line-height:1.65;
}

[class*="theme-"] .hero-below .hero-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:10px;
  margin-top:8px;
}

@media (max-width: 640px){
  [class*="theme-"] .hero-below{
    width:min(calc(100% - 20px), var(--container));
    margin:-24px auto 34px;
  }
  [class*="theme-"] .hero-below__inner{
    padding:20px 18px;
    border-radius:20px;
  }
  [class*="theme-"] .hero-below .hero-title{
    font-size:clamp(26px, 8vw, 36px);
  }
}

/* Sections / Cards */
.section{ padding: var(--section-pad) 0; }
.section-title{
  margin: 0 0 14px 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.grid-3{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
}
@media (max-width: 900px){
  .grid-3{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 600px){
  .grid-3{ grid-template-columns: 1fr; }
}

.card{
  background: #fff;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
/* Cards : un peu de marge sur grands écrans */
:root{ --card-max: 1040px; } /* ajuste (980 / 1040 / 1100) selon ton goût */

@media (min-width: 1200px){
  [class*="theme-"] .card{
    max-width: var(--card-max);
    margin-left: auto;
    margin-right: auto;
  }
}


.card h3{ margin: 0 0 6px 0; font-size: 18px; }
.card p{ margin: 0; color: rgba(15,23,42,.70); }

/* Weather (common across themes) */
[class*="theme-"] .meteo-page{ padding:8px 0 4px; }
[class*="theme-"] .meteo-page__title{ margin:0; }
[class*="theme-"] .meteo-page__location{ margin:6px 0 16px; font-size:18px; }
[class*="theme-"] .meteo-card{
  max-width:none;
  border:1px solid rgba(15,23,42,.12);
  background:#fff;
}
[class*="theme-"] .meteo-card + .meteo-card{ margin-top:14px; }
[class*="theme-"] .meteo-card--empty{ padding:18px; }
[class*="theme-"] .meteo-card--current{
  padding:18px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(255,255,255,.96)),
    linear-gradient(135deg, var(--primary), var(--secondary));
  border:1px solid rgba(15,23,42,.14);
}
[class*="theme-"] .meteo-current{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}
[class*="theme-"] .meteo-current__meta{ min-width:200px; }
[class*="theme-"] .meteo-current__status{
  margin:0;
  font-size:clamp(22px, 2.8vw, 34px);
  line-height:1.06;
  letter-spacing:-.03em;
  font-weight:900;
  color:var(--secondary);
}
[class*="theme-"] .meteo-current__line{ margin-top:6px; }
[class*="theme-"] .meteo-current__temp{
  display:flex;
  align-items:center;
  gap:10px;
}
[class*="theme-"] .meteo-current__value{
  font-size:clamp(32px, 4vw, 52px);
  line-height:1;
  letter-spacing:-.03em;
  font-weight:900;
}
[class*="theme-"] .meteo-current__icon{
  font-size:clamp(38px, 4vw, 50px);
  line-height:1;
}
[class*="theme-"] .meteo-card--forecast{
  padding:0;
  overflow:hidden;
}
[class*="theme-"] .meteo-forecast__title{
  margin:0;
  padding:14px 16px;
  color:rgb(var(--on-primary-rgb));
  background:linear-gradient(90deg, var(--secondary), var(--primary));
  font-size:clamp(20px, 2.2vw, 28px);
  line-height:1.1;
  letter-spacing:-.02em;
  font-weight:900;
}
[class*="theme-"] .meteo-forecast__grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(160px, 1fr));
  gap:0;
}
[class*="theme-"] .meteo-day{
  min-height:228px;
  padding:16px 12px 14px;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  border-top:1px solid rgba(15,23,42,.10);
  border-right:1px solid rgba(15,23,42,.10);
  background:linear-gradient(180deg, #fff, rgba(15,23,42,.03));
}
[class*="theme-"] .meteo-day:last-child{ border-right:0; }
[class*="theme-"] .meteo-day__label{
  margin:0;
  color:var(--secondary);
  font-size:clamp(17px, 1.3vw, 21px);
  line-height:1.06;
  letter-spacing:-.02em;
  font-weight:850;
}
[class*="theme-"] .meteo-day__icon{
  margin:12px 0 10px;
  font-size:52px;
  line-height:1;
}
[class*="theme-"] .meteo-day__temps{ margin-top:auto; }
[class*="theme-"] .meteo-day__max{
  font-size:32px;
  line-height:1.02;
  letter-spacing:-.03em;
  font-weight:900;
}
[class*="theme-"] .meteo-day__min{
  margin-top:4px;
  font-size:21px;
  line-height:1.05;
  color:rgba(15,23,42,.72);
  font-weight:700;
}
[class*="theme-"] .meteo-day__desc{
  margin-top:10px;
  font-size:14px;
  line-height:1.2;
  color:rgba(15,23,42,.72);
}
[class*="theme-"] .meteo-source{
  margin:12px 4px 0;
  font-size:13px;
}

@media (max-width: 760px){
  [class*="theme-"] .meteo-forecast__grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
  [class*="theme-"] .meteo-day{
    min-height:205px;
    padding:14px 10px 12px;
  }
  [class*="theme-"] .meteo-day__icon{ font-size:44px; }
  [class*="theme-"] .meteo-day__max{ font-size:28px; }
  [class*="theme-"] .meteo-day__min{ font-size:18px; }
}
@media (max-width: 520px){
  [class*="theme-"] .meteo-forecast__grid{ grid-template-columns:1fr; }
  [class*="theme-"] .meteo-day{
    min-height:0;
    border-right:0;
  }
}

/* Footer */
.site-footer{
  margin-top: 30px;
  background: var(--secondary);
  color: rgb(var(--on-secondary-rgb));
  padding: 34px 0;
}
.footer-grid{
  display:grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 16px;
}
.footer-title{ font-weight: 900; margin-bottom: 8px; }
.footer-muted{ color: rgba(var(--on-secondary-rgb), .78); }
.site-footer a{ color: rgba(var(--on-secondary-rgb), .92); text-decoration:none; }
.site-footer a:hover{ text-decoration: underline; }
@media (max-width: 900px){
  .footer-grid{ grid-template-columns: 1fr; }
}

/* Accessibilité : réduction motion */
@media (prefers-reduced-motion: reduce){
  *{ transition:none !important; scroll-behavior:auto !important; }
}

.skip-link{
  position:absolute;
  left:-9999px;
  top:12px;
  width:1px;
  height:1px;
  overflow:hidden;
}

.skip-link:focus{
  left:12px;
  width:auto;
  height:auto;
  padding:10px 12px;
  background:#fff;
  color: var(--ink);
  border:1px solid var(--border);
  border-radius:12px;
  z-index: 99999;
}

/* ===== NEWS (liste + show) ===== */

/* Ratio wrapper (utilisé en admin + public) */
.cover-16x9{
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(2,6,23,.06);
}
.cover-16x9 > img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 50%;
}

/* Ratio wrapper 4/3 (édito, galerie, etc.) */
.cover-4x3{
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: rgba(2,6,23,.06);
}
.cover-4x3 > img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 50%;
}


/* Liste des actualités */
.section-cards.news-list{
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 18px;
  margin-top: 16px;
}

.news-card{
  padding: 0;               /* on gère le padding via __body */
  overflow: hidden;
  display: grid;
  grid-template-columns: clamp(220px, 32vw, 360px) 1fr;
  align-items: stretch;
}

/* Media à gauche (16/9) */
.news-card__media{
  display: block;
  margin: 0;
  border: 0;
}
.news-card__media.cover-16x9{
  border-radius: 0;         /* le radius vient de .news-card (overflow hidden) */
}

/* Placeholder si pas d'image */
.news-card__media--empty{
  background:
    radial-gradient(600px 240px at 20% 30%, rgba(255,255,255,.35), transparent 55%),
    linear-gradient(135deg, rgba(2,6,23,.10), rgba(2,6,23,.04));
}

/* Corps */
.news-card__body{
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;             /* évite débordement des titres */
}

.news-card__meta{
  font-size: 13px;
  color: rgba(15,23,42,.68);
}

.news-card__title{
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.news-card__title a{
  color: inherit;
  text-decoration: none;
}

.news-card__title a:hover{
  text-decoration: underline;
  text-underline-offset: 3px;
}

.news-card__excerpt{
  margin: 0;
  color: rgba(15,23,42,.82);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.news-card__more{
  margin-top: auto;
  font-weight: 800;
  font-size: 14px;
}

.news-card__more a{
  color: var(--primary);
  text-decoration: none;
}

.news-card__more a:hover{
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 760px){
  .news-card{
    grid-template-columns: 1fr;
  }
  .news-card__body{
    padding: 14px 16px;
  }
}

/* Page article (news_show.php) : cover centrée, 16/9, max-height 400px */
.news-cover{
  width: 100%;
  max-width: 711px; /* 400px * 16/9 */
  margin: 0 auto 18px;
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(2,6,23,.10);
}

/* ===== END NEWS ===== */

/* ===== Social links (menu mobile + footer) ===== */

/* Cache TOUJOURS par défaut (y compris desktop + thèmes qui surchargent) */
.site-nav .nav-social{ display:none !important; }


/* Menu mobile ouvert */
/* Menu mobile ouvert */
/* Menu mobile ouvert */

/* ===== Navigation multi-niveaux (rubrique > sous-rubrique > page) ===== */
.site-nav .nav-submenu.nav-submenu--structured,
.theme-services .site-nav--services .nav-submenu.nav-submenu--structured,
.theme-civique .site-nav--civique .nav-submenu.nav-submenu--structured,
.theme-patrimoine .site-nav--patrimoine .nav-submenu.nav-submenu--structured,
.theme-village .site-header--village .nav-submenu.nav-submenu--structured{
  grid-auto-flow:row !important;
  grid-template-rows:none !important;
  grid-template-columns:repeat(var(--submenu-cols, 1), minmax(min(var(--submenu-col-width, 220px), 100%), 1fr)) !important;
  align-items:start;
}

.site-nav .nav-subsection{
  display:grid;
  gap:7px;
  min-width:0;
  align-self:start;
  break-inside:avoid;
}

.site-nav .nav-subsection-title-row{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
  padding:4px;
  border-radius:12px;
  background:rgba(15,23,42,.045);
  cursor:pointer;
}

.site-nav .nav-subsection-title-row--link{
  cursor:default;
}

.site-nav .nav-subsection-title{
  flex:1 1 auto;
  min-width:0;
  display:block;
  font-weight:950;
  line-height:1.18;
  letter-spacing:.015em;
  color:inherit;
  text-decoration:none;
  padding:7px 8px;
  border-radius:9px;
  background:transparent;
}

.site-nav span.nav-subsection-title{
  cursor:default;
}

.site-nav .nav-subsection-toggle{
  flex:0 0 auto;
  width:34px;
  height:34px;
  border:1px solid rgba(15,23,42,.12);
  border-radius:10px;
  background:rgba(255,255,255,.86);
  color:inherit;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:0 6px 16px rgba(15,23,42,.08);
}

.site-nav .nav-subsection-toggle:hover,
.site-nav .nav-subsection-toggle:focus-visible{
  border-color:currentColor;
  outline:none;
}

.site-nav .nav-subsection-toggle span{
  display:block;
  line-height:1;
  transition:transform .18s ease;
}

.site-nav .nav-subsection.is-open > .nav-subsection-title-row .nav-subsection-toggle span{
  transform:rotate(180deg);
}

.site-nav .nav-subsection-links{
  display:grid;
  gap:4px;
  min-width:0;
  margin-left:10px;
  padding:4px 0 2px 12px;
  border-left:2px solid rgba(15,23,42,.10);
}

.site-nav .nav-subsection-links[hidden],
.site-nav .nav-subsection:not(.is-open) > .nav-subsection-links{
  display:none !important;
}

.site-nav .nav-submenu.nav-submenu--structured > a{
  align-self:start;
}

@media (max-width: 880px){
  .site-nav .nav-submenu.nav-submenu--structured,
  .theme-services .site-nav--services .nav-submenu.nav-submenu--structured,
  .theme-civique .site-nav--civique .nav-submenu.nav-submenu--structured,
  .theme-patrimoine .site-nav--patrimoine .nav-submenu.nav-submenu--structured,
  .theme-village .site-header--village .nav-submenu.nav-submenu--structured{
    grid-template-columns:repeat(var(--submenu-cols, 1), minmax(0, 1fr)) !important;
    gap:10px !important;
  }
}

@media (max-width: 560px){
  .site-nav .nav-submenu.nav-submenu--structured,
  .theme-services .site-nav--services .nav-submenu.nav-submenu--structured,
  .theme-civique .site-nav--civique .nav-submenu.nav-submenu--structured,
  .theme-patrimoine .site-nav--patrimoine .nav-submenu.nav-submenu--structured,
  .theme-village .site-header--village .nav-submenu.nav-submenu--structured{
    grid-template-columns:1fr !important;
  }
}
@media (max-width: 880px){
  .site-header.is-open .site-nav .nav-social{
    display:flex !important;
    width:100%;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }

  .site-header.is-open .site-nav .nav-social__link{
    width: 40px !important;
    height: 40px;
    padding: 0 !important;
    border-radius: 999px;
    display:inline-flex !important;
    align-items:center;
    justify-content:center !important;
    text-decoration:none;

    background: rgba(2,6,23,.06);
    border: 1px solid rgba(2,6,23,.10);
    color: var(--primary);

    box-shadow: none;
    transition: transform .12s ease, filter .12s ease;
  }

  @supports (background: color-mix(in srgb, var(--primary) 20%, transparent)){
    .site-header.is-open .site-nav .nav-social__link{
      background: color-mix(in srgb, var(--primary) 16%, transparent);
      border-color: color-mix(in srgb, var(--primary) 28%, transparent);
    }
  }

  .site-header.is-open .site-nav .nav-social__link:hover{
    transform: translateY(-1px);
    filter: brightness(0.98);
  }
}



/* Footer : même style */
.footer-social__link{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;

  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  color: rgb(var(--on-secondary-rgb));

  box-shadow: none;
  transition: transform .12s ease, filter .12s ease;
}
.footer-social__link:hover{
  transform: translateY(-1px);
  filter: brightness(0.98);
}

/* SVG */
.nav-social .social-icon,
.footer-social .social-icon{
  width: 20px;
  height: 20px;
  display:inline-flex;
}
.nav-social svg,
.footer-social svg{
  width: 20px;
  height: 20px;
  display:block;
  fill: currentColor;
}



/* Footer */
.footer-social{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* =============================
   Bandeau pages internes + breadcrumb
   ============================= */

.breadcrumb-bar{
  background:#fff;
  border-bottom: 1px solid var(--border);
}
.breadcrumb{
  padding: 10px 0;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumb ol{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
}
.breadcrumb li{ display:flex; align-items:center; gap: 8px; }
.breadcrumb li + li::before{
  content:"›";
  opacity:.55;
}
.breadcrumb a{ color: inherit; text-decoration:none; }
.breadcrumb a:hover{ text-decoration:underline; }

.page-head{
  position: relative;
  min-height: var(--page-head-h, 170px);
  overflow: hidden;
  border-bottom: 1px solid rgba(15,23,42,.10);
  background:
    radial-gradient(1100px 520px at 15% 25%, rgba(var(--primary-rgb), .16), transparent 62%),
    radial-gradient(900px 460px at 80% 10%, rgba(var(--secondary-rgb), .12), transparent 56%),
    linear-gradient(135deg, rgba(255,255,255,.88), rgba(255,255,255,.98));
}
.page-head__media{
  position:absolute;
  inset:0;
  z-index: 0;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: var(--page-head-pos, 50% 50%);
  background-image: var(--page-head-img, none);
  transform: scale(var(--page-head-zoom, 1.02));
  /* Assure un voile visible même si une surcouche perturbe l'overlay */
  filter: brightness(var(--page-head-brightness, 0.78));
}
.page-head__overlay{
  position:absolute;
  inset:0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2,6,23,.35), rgba(2,6,23,.55)),
    radial-gradient(700px 320px at 15% 20%, rgba(var(--primary-rgb), .22), transparent 60%),
    radial-gradient(700px 320px at 85% 10%, rgba(var(--secondary-rgb), .18), transparent 55%);
  opacity: var(--page-head-overlay, .55);
}
.page-head__inner{
  position:relative;
  z-index: 2;
  box-sizing: border-box;
  padding: 22px 0 28px;
  min-height: var(--page-head-h, 170px);
  display:flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
}
.page-head__title{
  margin:0;
  font-weight: 950;
  letter-spacing: -0.03em;
  font-size: clamp(26px, 3.1vw, 44px);
  color: #fff;
  text-shadow: 0 14px 36px rgba(0,0,0,.38);
}
.page-head__lead{
  margin:0;
  max-width: 72ch;
  color: rgba(255,255,255,.92);
  text-shadow: 0 12px 28px rgba(0,0,0,.34);
}

.page-head--noimg .page-head__media{ display:none; }
.page-head--noimg .page-head__overlay{ display:none; }
.page-head--noimg .page-head__title{ color: var(--ink); text-shadow:none; }
.page-head--noimg .page-head__lead{ color: var(--muted); text-shadow:none; }

@media (max-width: 640px){
  .page-head{ min-height: clamp(140px, var(--page-head-h, 170px), 320px); }
  .page-head__inner{ min-height: clamp(140px, var(--page-head-h, 170px), 320px); padding: 18px 0 22px; }
}




/* ===== Préchargement ===== */
.site-preload{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:32px 20px;
  background:var(--site-preload-bg,#fff);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .24s ease, visibility .24s ease;
}
.site-preload.is-visible{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}
.site-preload.is-leaving{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}
.site-preload__inner{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:18px;
  min-height:140px;
  text-align:center;
  transform-origin:center center;
  will-change:transform,opacity;
}
.site-preload__text{
  margin:0;
  max-width:min(90vw,760px);
  color:var(--site-preload-text-color, rgb(var(--site-preload-text-rgb, 17 24 39)));
}
.site-preload__text--top{
  font-size:clamp(14px, var(--site-preload-text-top-size, 18px), 42px);
  line-height:1.24;
  font-weight:700;
  opacity:.88;
}
.site-preload__text--bottom{
  font-size:clamp(13px, var(--site-preload-text-bottom-size, 16px), 36px);
  line-height:1.3;
  font-weight:600;
  opacity:.82;
}
.site-preload__visual{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
}
.site-preload__visual--image{
  width:auto;
  min-height:0;
  max-width:min(76vw, calc(var(--site-preload-visual-size, 120px) * 2.4));
}
.site-preload__logo{
  display:block;
  width:auto;
  max-width:min(calc(var(--site-preload-visual-size, 120px) * 2.4), 76vw);
  max-height:min(var(--site-preload-visual-size, 120px), 28vh);
  object-fit:contain;
  filter:drop-shadow(0 12px 30px rgba(15,23,42,.12));
}
.site-preload__fallback{
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:min(calc(var(--site-preload-visual-size, 120px) * 1.25), 76vw);
  min-height:calc(var(--site-preload-visual-size, 120px) * .68);
  padding:14px 18px;
  border-radius:20px;
  border:1px solid rgba(15,23,42,.08);
  background:rgba(255,255,255,.45);
  box-shadow:0 16px 30px rgba(15,23,42,.08);
  color:var(--site-preload-text-color, rgb(var(--site-preload-text-rgb, 17 24 39)));
  font-weight:800;
  font-size:clamp(18px, 3vw, 32px);
  line-height:1.08;
  letter-spacing:-.03em;
}
.site-preload__visual--spinner{
  width:min(var(--site-preload-visual-size, 120px), 42vw);
  height:min(var(--site-preload-visual-size, 120px), 42vw);
}
.site-preload__spinner{
  position:relative;
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
}
.site-preload [hidden]{
  display:none !important;
}
.site-preload__spinner--ring{
  width:100%;
  height:100%;
  box-sizing:border-box;
  border-radius:999px;
  border:6px solid rgb(var(--site-preload-secondary-rgb, var(--secondary-rgb)) / .16);
  border-top-color:var(--site-preload-primary, var(--primary));
  border-right-color:var(--site-preload-secondary, var(--secondary));
  animation:sitePreloadSpin .95s linear infinite;
}
.site-preload__spinner--dual{
  width:100%;
  height:100%;
}
.site-preload__spinner--dual span{
  position:absolute;
  box-sizing:border-box;
  border-radius:999px;
  border:5px solid transparent;
}
.site-preload__spinner--dual span:first-child{
  inset:0;
  border-top-color:var(--site-preload-primary, var(--primary));
  border-right-color:var(--site-preload-primary, var(--primary));
  animation:sitePreloadSpin 1s linear infinite;
}
.site-preload__spinner--dual span:last-child{
  inset:16%;
  border-bottom-color:var(--site-preload-secondary, var(--secondary));
  border-left-color:var(--site-preload-secondary, var(--secondary));
  animation:sitePreloadSpinReverse 1.15s linear infinite;
}
.site-preload__spinner--ripple{
  width:100%;
  height:100%;
}
.site-preload__spinner--ripple span{
  position:absolute;
  inset:18%;
  box-sizing:border-box;
  border-radius:999px;
  opacity:0;
  border:4px solid rgb(var(--site-preload-primary-rgb, var(--primary-rgb)) / .72);
  animation:sitePreloadRipple 1.6s ease-out infinite;
}
.site-preload__spinner--ripple span:last-child{
  border-color:rgb(var(--site-preload-secondary-rgb, var(--secondary-rgb)) / .72);
  animation-delay:.8s;
}
.site-preload__spinner--diamond{
  width:100%;
  height:100%;
  animation:sitePreloadSpin 1.8s linear infinite;
}
.site-preload__spinner--diamond span{
  position:absolute;
  width:18%;
  aspect-ratio:1;
  border-radius:999px;
  box-shadow:0 10px 20px rgb(var(--site-preload-primary-rgb, var(--primary-rgb)) / .16);
}
.site-preload__spinner--diamond span:nth-child(1){
  top:10%;
  left:50%;
  transform:translate(-50%,0);
  background:var(--site-preload-primary, var(--primary));
}
.site-preload__spinner--diamond span:nth-child(2){
  top:50%;
  right:10%;
  transform:translate(0,-50%);
  background:var(--site-preload-secondary, var(--secondary));
}
.site-preload__spinner--diamond span:nth-child(3){
  bottom:10%;
  left:50%;
  transform:translate(-50%,0);
  background:var(--site-preload-primary, var(--primary));
}
.site-preload__spinner--diamond span:nth-child(4){
  top:50%;
  left:10%;
  transform:translate(0,-50%);
  background:var(--site-preload-secondary, var(--secondary));
}
.site-preload__spinner--dots{
  gap:10%;
  width:100%;
  height:40%;
}
.site-preload__spinner--dots span{
  flex:0 0 18%;
  width:18%;
  aspect-ratio:1;
  border-radius:999px;
  background:var(--site-preload-primary, var(--primary));
  animation:sitePreloadDot 1.1s ease-in-out infinite;
  box-shadow:0 10px 20px rgb(var(--site-preload-primary-rgb, var(--primary-rgb)) / .18);
}
.site-preload__spinner--dots span:nth-child(2){
  background:var(--site-preload-secondary, var(--secondary));
  animation-delay:.14s;
}
.site-preload__spinner--dots span:nth-child(3){
  background:var(--site-preload-primary, var(--primary));
  animation-delay:.28s;
}
.site-preload__spinner--bars{
  gap:10%;
  width:100%;
  height:100%;
  align-items:flex-end;
}
.site-preload__spinner--bars span{
  width:20%;
  height:36%;
  border-radius:999px;
  background:linear-gradient(180deg, var(--site-preload-primary, var(--primary)), var(--site-preload-secondary, var(--secondary)));
  animation:sitePreloadBar .95s ease-in-out infinite;
  box-shadow:0 12px 26px rgb(var(--site-preload-primary-rgb, var(--primary-rgb)) / .16);
}
.site-preload__spinner--bars span:nth-child(2){
  height:62%;
  animation-delay:.12s;
}
.site-preload__spinner--bars span:nth-child(3){
  height:46%;
  animation-delay:.24s;
}
.site-preload__bar{
  position:absolute;
  inset:0 0 auto 0;
  height:3px;
  overflow:hidden;
  background:rgb(var(--site-preload-secondary-rgb, var(--secondary-rgb)) / .10);
}
.site-preload__bar-fill{
  display:block;
  width:100%;
  height:100%;
  transform:scaleX(0);
  transform-origin:0 50%;
  background:linear-gradient(90deg, var(--site-preload-primary, var(--primary)), var(--site-preload-secondary, var(--secondary)));
  transition:transform .18s linear;
}
html.has-site-preload,
body.has-site-preload{
  overflow:hidden;
}
.site-preload[data-animation="fade"] .site-preload__inner{
  animation:sitePreloadFade 1.15s ease-in-out infinite;
}
.site-preload[data-animation="pulse"] .site-preload__inner{
  animation:sitePreloadPulse 1.35s ease-in-out infinite;
}
.site-preload[data-animation="zoom"] .site-preload__inner{
  animation:sitePreloadZoom 1.65s ease-in-out infinite;
}
.site-preload.is-reduced-motion,
.site-preload.is-reduced-motion *{
  animation:none !important;
  transition:none !important;
}
@keyframes sitePreloadFade{
  0%,100%{ opacity:.62; }
  50%{ opacity:1; }
}
@keyframes sitePreloadPulse{
  0%,100%{ transform:scale(1); opacity:.92; }
  50%{ transform:scale(1.04); opacity:1; }
}
@keyframes sitePreloadZoom{
  0%,100%{ transform:scale(.97); opacity:.9; }
  50%{ transform:scale(1.03); opacity:1; }
}
@keyframes sitePreloadSpin{
  to{ transform:rotate(360deg); }
}
@keyframes sitePreloadSpinReverse{
  to{ transform:rotate(-360deg); }
}
@keyframes sitePreloadDot{
  0%,80%,100%{ transform:translateY(0); opacity:.5; }
  40%{ transform:translateY(-22%); opacity:1; }
}
@keyframes sitePreloadBar{
  0%,100%{ transform:scaleY(.65); opacity:.8; }
  50%{ transform:scaleY(1); opacity:1; }
}
@keyframes sitePreloadRipple{
  0%{ transform:scale(.28); opacity:0; }
  20%{ opacity:.95; }
  100%{ transform:scale(1); opacity:0; }
}
@media (max-width: 640px){
  .site-preload__bar{ height:2px; }
  .site-preload__visual--spinner{
    width:min(var(--site-preload-visual-size, 120px), 52vw);
    height:min(var(--site-preload-visual-size, 120px), 52vw);
  }
}



.site-footer{
  position: relative;
}
.site-footer__logo-wrap{
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: -28px auto 14px;
  pointer-events: none;
}
.site-footer__logo{
  display:block;
  width:auto;
  height:auto;
  max-width:min(180px, 42vw);
  max-height:96px;
  object-fit:contain;
}
