/* =========================================================
   WeatherNCo — CORE (socle moderne)
   Fichier: css/wnco-core.css
   Objectif: base commune (cours + pages contenu), stable & maintenable
   ========================================================= */

/* 0) Reset minimal */
html, body { margin: 0; padding: 0; height: 100%; }

/* 1) Variables globales */
:root{
  /* Brand */
  --wnco-primary: #2874a6;
  --wnco-primary-2: #1f5f8a;
  --wnco-primary-4: #f6f8fb;
  --wnco-accent: #22d3ee;
  --wnco-orange: #fd4700;        /* hover historique */
  --wnco-orange-soft: rgba(253,71,0,.18);
  /* Neutres */
  --wnco-bg: #ffffff;
  --wnco-surface: #ffffff;
  --wnco-text: #0f172a;
  --wnco-muted: rgba(15,23,42,.68);

  /* UI */
  --wnco-radius: 14px;
  --wnco-radius-sm: 10px;
  --wnco-shadow: 0 10px 24px rgba(0,0,0,.08);
  --wnco-border: 1px solid rgba(15,23,42,.10);

  /* Typo */
  --wnco-font: Raleway,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif;
}

/* 2) Base */
body{
  font-family: var(--wnco-font);
  color: var(--wnco-text);
  background: var(--wnco-bg);
  line-height: 1.55;
}

/* Liens */
a{ color: var(--wnco-primary); text-decoration: none; }
a:hover{
  color: color-mix(in srgb, var(--wnco-orange) 70%, #000);
  text-decoration: underline;
} 

/* Titres (sobre, lisible cours) */
h1,h2,h3,h4,h5,h6{
  color: rgba(15,23,42,.96);
  line-height: 1.15;
  font-weight: 500;
}
h1{ font-size: 1.75rem; }
h2{ font-size: 1.35rem; }
h3{ font-size: 1.05rem; color: rgba(15,23,42,.72); font-weight: 650; }

p{ color: rgba(15,23,42,.86); margin: 0 0 1rem; }

/* ================================
   Titres de cours — harmonisation
   ================================ */

.col-lg-9 h2{
  font-size: 1.15rem;
  font-weight: 600;
}

.col-lg-9 p{
  font-size: 0.96rem;
  line-height: 1.7;
}  

.col-lg-9 h3{
  font-size: 1.05rem;       /* très proche du paragraphe */
  font-weight: 600;
  color: rgba(15,23,42,.75);
  margin-top: 1rem;
  margin-bottom: .4rem;
}



/* 3) Container / offset navbar sticky */
.container{
  padding-top: 4px; /* laisse respirer sous navbar sticky */
  padding-bottom: 2px;
}

/* 4) Composants “cours” (sidebar + contenu) */
/* ================================
   Sidebar (list-group) — version plus lisible
   ================================ */

/* Cadre plus présent */
.list-group{
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid rgba(15,23,42,.14);
  box-shadow: 0 8px 18px rgba(0,0,0,.10);
  background: #fff;
}

/* Items plus “confort” */
.list-group .list-group-item{
  padding: 12px 14px;                  /* + aéré */
  line-height: 1.2;
  font-size: 0.80rem;
  color: rgba(15,23,42,.88);
  border: 0;
  border-bottom: 1px solid rgba(15,23,42,.08);
}

/* Hover très doux */
.list-group .list-group-item:not(.active):hover{
  background: rgba(40,116,166,.08);
  color: var(--wnco-primary-2);
}

/* ✅ “Séparateur pédagogique” (tes titres Meteo - Rappel / Ateliers)
   On les garde sobres mais très visibles */
.list-group .list-group-item.active{
  background: var(--wnco-primary-2) !important; /* plein */
  color: #fff !important;
  font-weight: 400;
  text-transform: uppercase;
  font-size: 0.80rem;
  letter-spacing: .35px;
  border-left: 8px solid var(--wnco-orange);   /* petit rappel orange */
}


/* Bonus : un peu plus d’espace autour des “titres de section” */
.list-group .list-group-item.active{
  padding-top: 14px;
  padding-bottom: 14px;
}

/* 5) Cards / encarts utilitaires */
.wnco-card{
  background: var(--wnco-surface);
  border: var(--wnco-border);
  border-radius: var(--wnco-radius);
  box-shadow: var(--wnco-shadow);
  padding: 16px 18px;
}

.wnco-banner{
  background: linear-gradient(90deg, rgba(40,116,166,.16) 0%, rgba(40,116,166,.05) 100%);
  border-left: 5px solid var(--wnco-accent);
  border-radius: var(--wnco-radius);
  padding: 14px 16px;
}

/* Highlight “navy” (si tu l’utilises déjà) */
.bold-text-navy{
  font-weight: 900;
  color: var(--wnco-primary);
}

/* 6) Boutons optionnels (sans casser Bootstrap) */
.btn-wnco{
  background: var(--wnco-primary);
  border-color: var(--wnco-primary);
  color: #fff;
  border-radius: 999px;
  font-weight: 650;
}
.btn-wnco:hover{
  background: var(--wnco-primary-2);
  border-color: var(--wnco-primary-2);
  color: #fff;
}

.btn-wnco-outline{
  background: transparent;
  border: 1px solid rgba(40,116,166,.55);
  color: var(--wnco-primary);
  border-radius: 999px;
  font-weight: 650;
}
.btn-wnco-outline:hover{
  background: rgba(40,116,166,.08);
  color: var(--wnco-primary-2);
}

/* 7) Footer base (structure) */
footer{
  margin-top: 28px;
}

/* 8) Responsive */
@media (max-width: 991px){
  .container{ padding-top: 84px; }
  .list-group{ box-shadow: none; }
}
/* ================================
   Index alphabétique — Lexique
   ================================ */

.alphabet-index{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(15,23,42,.08);
  background: #fff;
}

.alphabet-index a{
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--wnco-primary-2);
  text-decoration: none;
  padding: 3px 6px;
  border-radius: 3px;
  transition: background-color .15s ease, color .15s ease;
}

/* 🔥 touche orange */
.alphabet-index a:hover{
  background: var(--wnco-orange);
  color: #fff;
}

/* ================================
   Barre de recherche — Lexique
   ================================ */
/* Sidebar = sticky bloc complet */
.lexique-sidebar{
  position: sticky;
  top: 120px; /* ajuste selon ta navbar */
}

/* La search ne doit plus être sticky individuellement */
.lexique-search{
  position: relative;
  top: auto;
  z-index: 1;
  background: #fff;
}

/* Index alphabétique : toujours visible, 2 lignes si besoin */
.alphabet-index{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
  background: #fff;
  border-bottom: 1px solid rgba(15,23,42,.08);
}

/* Liste des mots : scroll interne */
.lexique-list-scroll{
  max-height: calc(100vh - 320px); /* hauteur écran - header sidebar */
  overflow: auto;
  background: #fff;
}
/* Lexique — tables lisibles */
.lex-table{
  overflow-x:auto;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(0,0,0,.06);
  margin: 12px 0 18px;
}

.lex-table .table{
  margin: 0;
  white-space: nowrap; /* évite les retours moches */
}

.lex-table thead th{
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
  border-bottom: 2px solid rgba(15,23,42,.12);
}

.lex-caption{
  padding: 10px 12px;
  font-weight: 700;
  border-bottom: 1px solid rgba(15,23,42,.10);
}

/* ================================
   Lexique — images
   ================================ */

.lex-figure {
  margin: 1.2rem 0;
  text-align: center;
}

.lex-figure img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
}

/* Limitation largeur desktop */
@media (min-width: 992px) {
  .lex-figure img {
    max-width: 720px;   /* valeur idéale pour un lexique */
  }
}

/* Mobile : plein écran fluide */
@media (max-width: 575px) {
  .lex-figure img {
    max-width: 100%;
  }
}

/* Légende */
.lex-figure figcaption {
  margin-top: .4rem;
  font-size: .82rem;
  color: rgba(15,23,42,.65);
}

.hr-wnco {
  border: 0;
  height: 3px;
  background-color: #0b3a6f; /* bleu foncé type WeatherNCo */
  opacity: 1;
}
.flag-icon {
  width: 22px;
  height: 22px;
  margin-right: 8px;
  vertical-align: middle;
}
  .thumb {
  max-width: 300px;
  width: 100%;
  height: auto;
  border-radius: 14px;
  cursor: zoom-in;
  transition: transform .2s ease;
}
.thumb:hover {
  transform: scale(1.03);
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.80);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox.open {
  display: flex;
}
.lightbox img {
  max-width: min(1200px, 95vw);
  max-height: 92vh;
  border-radius: 16px;
  box-shadow: 0 15px 40px rgba(0,0,0,.45);
}
.lightbox .close-hint {
  position: absolute;
  top: 18px;
  right: 22px;
  color: white;
  font-size: 0.9rem;
  opacity: .85;
}
