/*
Theme Name: ENERGY-Lab Modern
Theme URI: https://www.energylab.re/
Author: ENERGY-Lab, Université de La Réunion
Author URI: https://www.energylab.re/
Description: Thème moderne pour le laboratoire ENERGY-Lab. Basé sur la charte graphique LE2P. Libre de droit (GPLv2+).
Version: 1.1.0
License: Proprietary — Theme and brand guidelines commissioned by ENERGY-Lab / Université de La Réunion
License URI: https://www.energylab.re/mentions-legales/
Text Domain: energylab-modern
Tags: research, laboratory, modern, responsive, university
*/

/* ============================================================
   VARIABLES & RESET
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@300;400;600;700;800&family=Titillium+Web:wght@300;400;600;700&display=swap');

:root {
  --blue-dark:    #154164;
  --blue-mid:     #1a5276;
  --blue-light:   #2980b9;
  --orange:       #F39916;
  --charcoal:     #343535;
  --grey-light:   #f4f6f8;
  --grey-mid:     #e8ecef;
  --grey-text:    #5a6470;
  --white:        #ffffff;

  --font-display: 'Exo 2', sans-serif;
  --font-body:    'Titillium Web', sans-serif;

  --radius:       6px;
  --shadow-sm:    0 2px 8px rgba(21,65,100,.10);
  --shadow-md:    0 6px 24px rgba(21,65,100,.15);
  --shadow-lg:    0 16px 48px rgba(21,65,100,.20);
  --transition:   0.25s ease;

  --container:    1200px;
  --header-h:     72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--orange); }
ul { list-style: none; }

/* ============================================================
   RESET AGRESSIF — écrase Bootstrap/jQuery UI/plugins
   ============================================================ */
#masthead, #masthead *, #masthead *:before, #masthead *:after {
  box-sizing: border-box;
}
#masthead a {
  color: rgba(255,255,255,.85) !important;
  text-decoration: none !important;
  background: transparent !important;
}
#masthead nav ul, #masthead nav ol {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}
#masthead nav li {
  background: transparent !important;
  margin: 0 !important;
  padding: 0 !important;
}


.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--blue-dark);
  position: relative;
  display: inline-block;
  margin-bottom: 12px;
}
.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 4px;
  background: var(--orange);
  border-radius: 2px;
  margin-top: 10px;
}
.section-subtitle {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1.05rem;
  color: var(--grey-text);
  margin-bottom: 40px;
  max-width: 640px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(243,153,22,.35);
}
.btn-primary:hover {
  background: #d4840f;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(243,153,22,.45);
}
.btn-outline {
  background: transparent;
  color: var(--blue-dark);
  border: 2px solid var(--blue-dark);
}
.btn-outline:hover {
  background: var(--blue-dark);
  color: var(--white);
  transform: translateY(-2px);
}
.btn-white {
  background: var(--white);
  color: var(--blue-dark);
  box-shadow: var(--shadow-sm);
}
.btn-white:hover {
  background: #ffffff;
  color: var(--blue-dark);
  transform: translateY(-2px);
}

/* ============================================================
   SKIP LINK (accessibility)
   ============================================================ */
.skip-link {
  position: absolute;
  top: -9999px; left: 16px;
  background: var(--orange);
  color: var(--white);
  padding: 8px 16px;
  border-radius: 0 0 var(--radius) var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  z-index: 9999;
}
.skip-link:focus { top: 0; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
#masthead {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--blue-dark);
  height: var(--header-h);
  display: flex;
  align-items: center;
  box-shadow: 0 2px 20px rgba(0,0,0,.25);
  transition: background var(--transition), height var(--transition);
}
#masthead.scrolled {
  background: rgba(21,65,100,.97);
  height: 60px;
  backdrop-filter: blur(12px);
}
#masthead .container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo */
.site-branding {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.site-branding img {
  height: 42px;
  width: auto;
  transition: height var(--transition);
}
#masthead.scrolled .site-branding img { height: 34px; }
.site-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--white);
  line-height: 1.2;
}
.site-title small {
  display: block;
  font-weight: 300;
  font-size: .7rem;
  color: rgba(255,255,255,.65);
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Primary Nav */
#primary-navigation {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow: visible;
  background: transparent;
}
/* WordPress génère un <ul> dans le nav */
#primary-navigation ul,
#primary-navigation > ul,
#primary-navigation ul#primary-menu {
  display: flex !important;
  align-items: center;
  flex-wrap: nowrap;
  list-style: none;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0;
  background: transparent !important;
}
/* Fallback : li directs quand pas de ul (notre fallback_cb) */
#primary-navigation > li,
#primary-navigation ul > li {
  display: flex !important;
  align-items: center;
  flex-shrink: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  background: transparent !important;
}
#primary-navigation a {
  font-family: var(--font-display);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: rgba(255,255,255,.9) !important;
  padding: 5px 7px;
  border-radius: var(--radius);
  transition: all var(--transition);
  white-space: nowrap;
  display: block;
  background: transparent;
}
#primary-navigation a:hover,
#primary-navigation .current-menu-item > a,
#primary-navigation .current-page-ancestor > a {
  color: var(--white) !important;
  background: rgba(243,153,22,.18) !important;
}
#primary-navigation .current-menu-item > a {
  color: var(--orange) !important;
}

/* Header extras */
.header-extras {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.lang-switcher a {
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 600;
  color: rgba(255,255,255,.7);
  padding: 4px 8px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 4px;
  transition: all var(--transition);
}
.lang-switcher a:hover {
  color: var(--white);
  border-color: var(--orange);
  background: rgba(243,153,22,.15);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
.menu-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ============================================================
   PAGE OFFSET FOR FIXED HEADER
   ============================================================ */
body { padding-top: var(--header-h); }
#page { min-height: 100vh; display: flex; flex-direction: column; }
#content { flex: 1; }

/* ============================================================
   HERO — HOMEPAGE
   ============================================================ */
.hero {
  position: relative;
  min-height: 520px;
  background: url('public/img/hero-bg.jpg') center center / cover no-repeat;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 80px 0 60px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(21,65,100,.88) 0%, rgba(26,82,118,.82) 50%, rgba(29,111,164,.75) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(243,153,22,.2);
  border: 1px solid rgba(243,153,22,.4);
  color: var(--orange);
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 22px;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 20px;
}
.hero-title em {
  font-style: normal;
  color: var(--orange);
}
.hero-description {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1.05rem;
  color: rgba(255,255,255,.85);
  line-height: 1.8;
  margin-bottom: 36px;
  max-width: 560px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-end;
}
.hero-stat-card {
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  padding: 20px 28px;
  text-align: center;
  width: 180px;
  transition: transform var(--transition), background var(--transition);
}
.hero-stat-card:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,.18);
}
.hero-stat-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.2rem;
  color: var(--orange);
  line-height: 1;
}
.hero-stat-label {
  font-family: var(--font-body);
  font-size: .78rem;
  color: rgba(255,255,255,.75);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 4px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
  .hero-stat-card { min-width: 120px; flex: 1; }
}

/* ============================================================
   SECTION : ORANGE ACCENT BAR
   ============================================================ */
.accent-bar {
  background: var(--orange);
  padding: 0;
  overflow: hidden;
}
.accent-bar-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0;
}
.accent-bar-inner span {
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--white);
  padding: 12px 24px;
  opacity: .9;
  text-align: center;
  white-space: nowrap;
}
.accent-bar-inner span::before {
  content: '\25C6';
  margin-right: 24px;
  opacity: .5;
}
.accent-bar-inner span:first-child::before {
  content: none;
}

/* ============================================================
   SECTION : PRÉSENTATION
   ============================================================ */
.section-presentation {
  padding: 80px 0;
  background: var(--white);
}
.presentation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.presentation-text .entry-content p {
  font-size: 1rem;
  color: var(--grey-text);
  line-height: 1.9;
  margin-bottom: 16px;
}
.presentation-text .entry-content ul {
  list-style: disc;
  padding-left: 20px;
  color: var(--grey-text);
}
.presentation-text .entry-content ul li {
  margin-bottom: 8px;
}
.presentation-text .entry-content a {
  color: var(--blue-light);
  font-weight: 600;
}
.presentation-text .entry-content a:hover { color: var(--orange); }
.presentation-media {
  position: relative;
}
.presentation-image-main {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.presentation-badge {
  position: absolute;
  bottom: -16px; left: -16px;
  background: var(--blue-dark);
  color: var(--white);
  border-radius: 10px;
  padding: 16px 20px;
  box-shadow: var(--shadow-md);
  font-family: var(--font-display);
  max-width: 200px;
}
.presentation-badge strong {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--orange);
}
.presentation-badge span {
  font-size: .75rem;
  font-weight: 300;
  opacity: .85;
  text-transform: uppercase;
  letter-spacing: .05em;
}
@media (max-width: 768px) {
  .presentation-grid { grid-template-columns: 1fr; gap: 40px; }
  .presentation-badge { position: static; margin-top: 16px; }
}

/* ============================================================
   SECTION : AXES / OS
   ============================================================ */
.section-axes {
  padding: 80px 0;
  background: #ffffff;
}
.section-axes .section-header { margin-bottom: 48px; }
.axes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.axe-card {
  background: var(--white);
  border-radius: 12px;
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--blue-dark);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.axe-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--orange);
}
.axe-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.axe-icon svg { width: 24px; height: 24px; fill: var(--white); }
.axe-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--blue-dark);
  line-height: 1.3;
}
.axe-desc {
  font-size: .88rem;
  color: var(--grey-text);
  line-height: 1.7;
  flex: 1;
}
.axe-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--orange);
  margin-top: 8px;
}
.axe-link svg { width: 14px; height: 14px; transition: transform var(--transition); }
.axe-card:hover .axe-link svg { transform: translateX(4px); }

/* ============================================================
   SECTION : CHIFFRES CLÉS (dark strip)
   ============================================================ */
.section-chiffres {
  background: var(--blue-dark);
  padding: 72px 0;
  position: relative;
  overflow: hidden;
}
.section-chiffres::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: rgba(243,153,22,.07);
}
.chiffres-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 48px;
  text-align: center;
  position: relative;
}
.chiffre-item {}
.chiffre-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  color: var(--orange);
  line-height: 1;
}
.chiffre-label {
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 300;
  color: rgba(255,255,255,.75);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 8px;
}
.chiffre-sep {
  width: 32px; height: 2px;
  background: var(--orange);
  margin: 10px auto 0;
  border-radius: 1px;
  opacity: .5;
}

/* ============================================================
   SECTION : ACTUALITÉS
   ============================================================ */
.section-actualites {
  padding: 80px 0;
  background: var(--white);
}
.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 48px;
  gap: 24px;
}
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}
.news-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--grey-mid);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.news-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.news-card-img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--grey-mid);
}
.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.news-card:hover .news-card-img img { transform: scale(1.05); }
.news-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.news-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.news-date {
  font-family: var(--font-display);
  font-size: .75rem;
  font-weight: 600;
  color: var(--grey-text);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.news-cat {
  font-family: var(--font-display);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: rgba(21,65,100,.08);
  color: var(--blue-dark);
  padding: 2px 10px;
  border-radius: 100px;
}
.news-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--charcoal);
  line-height: 1.4;
  flex: 1;
}
.news-title a { color: inherit; }
.news-title a:hover { color: var(--blue-dark); }
.news-excerpt {
  font-size: .88rem;
  color: var(--grey-text);
  line-height: 1.7;
}
.news-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--orange);
  margin-top: 8px;
}
.news-more svg { width: 14px; height: 14px; transition: transform var(--transition); }
.news-card:hover .news-more svg { transform: translateX(4px); }

/* ============================================================
   SECTION : PARTENAIRES
   ============================================================ */
.section-partenaires {
  padding: 64px 0;
  background: #ffffff;
  border-top: none;
}
.partners-label {
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--grey-text);
  text-align: center;
  margin-bottom: 32px;
}
.partners-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 24px 40px;
}
.partners-logos img {
  height: 55px;
  width: auto;
  object-fit: contain;
  transition: transform .2s ease;
}
.partners-logos img:hover {
  transform: scale(1.08);
}

/* ============================================================
   FOOTER
   ============================================================ */
#colophon {
  background: var(--charcoal);
  color: rgba(255,255,255,.75);
}
.footer-main {
  padding: 64px 0 40px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
@media (max-width: 900px) {
  .footer-main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 580px) {
  .footer-main { grid-template-columns: 1fr; }
}
.footer-brand img {
  height: 44px;
  width: auto;
  margin-bottom: 16px;
  filter: brightness(0) invert(1);
  opacity: .9;
}
.footer-desc {
  font-size: .88rem;
  line-height: 1.8;
  color: rgba(255,255,255,.6);
  margin-bottom: 20px;
}
.footer-address {
  font-size: .82rem;
  font-style: normal;
  color: rgba(255,255,255,.5);
  line-height: 1.9;
}
.footer-address strong {
  color: rgba(255,255,255,.8);
  font-weight: 600;
}
.footer-col-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--orange);
  display: inline-block;
}
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  font-size: .88rem;
  color: rgba(255,255,255,.6);
  transition: color var(--transition), padding-left var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-links a::before {
  content: '›';
  font-size: 1rem;
  color: var(--orange);
  flex-shrink: 0;
}
.footer-links a:hover {
  color: var(--white);
  padding-left: 4px;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy {
  font-size: .8rem;
  color: rgba(255,255,255,.4);
}
.footer-copy a { color: rgba(255,255,255,.5); }
.footer-copy a:hover { color: var(--orange); }
.footer-social-link {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-left: 6px;
  color: rgba(255,255,255,.5);
  transition: color .2s;
}
.footer-social-link:hover { color: var(--orange); }
.footer-social-link svg { display: block; }

/* ============================================================
   STANDARD PAGES (non-homepage)
   ============================================================ */
.page-hero {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-mid));
  padding: 52px 0 44px;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--orange) 0%, var(--blue-light) 100%);
}
.page-hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--white);
  line-height: 1.2;
}
.page-hero-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-family: var(--font-body);
  font-size: .82rem;
  color: rgba(255,255,255,.6);
}
.page-hero-breadcrumb a { color: rgba(255,255,255,.75); }
.page-hero-breadcrumb a:hover { color: var(--orange); }
.page-hero-breadcrumb span { color: rgba(255,255,255,.4); }

/* Page layout */
.page-layout {
  padding: 60px 0 80px;
}
.page-layout-inner {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
}
@media (max-width: 900px) {
  .page-layout-inner { grid-template-columns: 1fr; }
}
.entry-content h1, .entry-content h2, .entry-content h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--blue-dark);
  margin: 32px 0 16px;
  line-height: 1.3;
}
.entry-content h1 { font-size: 2rem; }
.entry-content h2 { font-size: 1.5rem; }
.entry-content h3 { font-size: 1.2rem; }
.entry-content p { margin-bottom: 18px; color: var(--grey-text); line-height: 1.9; }
.entry-content ul, .entry-content ol {
  padding-left: 24px;
  margin-bottom: 18px;
  color: var(--grey-text);
}
.entry-content li { margin-bottom: 8px; line-height: 1.7; }
.entry-content a { color: var(--blue-light); font-weight: 600; }
.entry-content a:hover { color: var(--orange); }
.entry-content img {
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  margin: 24px 0;
  max-width: 100%;
  height: auto !important;
}
/* Images partout — proportions conservées */
.panel-body img,
.tab-pane img,
.tab-content img,
.energylab-accordion-content img,
.energylab-tab-content img,
.col-sm-12 img,
.col-sm-9 img,
.col-md-12 img {
  max-width: 100%;
  height: auto !important;
}
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: .9rem;
}
.entry-content th {
  background: var(--blue-dark);
  color: var(--white);
  padding: 12px 16px;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.entry-content td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--grey-mid);
  color: var(--grey-text);
}
.entry-content tr:hover td { background: #ffffff; }

/* Sidebar */
.sidebar-widget {
  background: var(--white);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--grey-mid);
  margin-bottom: 24px;
}
.sidebar-widget-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--blue-dark);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--orange);
}

/* ============================================================
   MEMBRES
   ============================================================ */
.membres-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}
.membre-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--grey-mid);
  transition: transform var(--transition), box-shadow var(--transition);
  text-align: center;
}
.membre-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}
.membre-photo {
  aspect-ratio: 1;
  overflow: hidden;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-light));
}
.membre-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.membre-card:hover .membre-photo img { transform: scale(1.05); }
.membre-info { padding: 18px 16px; }
.membre-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  color: var(--charcoal);
  margin-bottom: 4px;
}
.membre-role {
  font-size: .8rem;
  color: var(--grey-text);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.membre-email a {
  font-size: .8rem;
  color: var(--orange);
  font-weight: 600;
}

/* ============================================================
   PUBLICATIONS
   ============================================================ */
.pub-list { display: flex; flex-direction: column; gap: 20px; }
.pub-item {
  background: var(--white);
  border-radius: 10px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--grey-mid);
  border-left: 4px solid var(--blue-dark);
  transition: border-color var(--transition), transform var(--transition);
}
.pub-item:hover {
  border-left-color: var(--orange);
  transform: translateX(4px);
}
.pub-year {
  display: inline-block;
  background: var(--blue-dark);
  color: var(--white);
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 100px;
  margin-bottom: 10px;
}
.pub-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  color: var(--charcoal);
  margin-bottom: 6px;
  line-height: 1.4;
}
.pub-authors {
  font-size: .84rem;
  color: var(--grey-text);
  margin-bottom: 6px;
}
.pub-journal {
  font-size: .84rem;
  font-style: italic;
  color: var(--blue-light);
}
.pub-doi a {
  font-size: .8rem;
  color: var(--orange);
  font-weight: 600;
}

/* ============================================================
   PROJETS
   ============================================================ */
.projets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}
.projet-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--grey-mid);
  transition: transform var(--transition), box-shadow var(--transition);
}
.projet-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.projet-card-header {
  padding: 24px;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-mid));
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.projet-tag {
  background: rgba(243,153,22,.2);
  border: 1px solid rgba(243,153,22,.4);
  color: var(--orange);
  font-family: var(--font-display);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  white-space: nowrap;
}
.projet-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--white);
}
.projet-card-body { padding: 20px 24px 24px; }
.projet-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  color: var(--charcoal);
  margin-bottom: 10px;
  line-height: 1.4;
}
.projet-desc {
  font-size: .88rem;
  color: var(--grey-text);
  line-height: 1.7;
}

/* ============================================================
   CONTACT FORM (basic reset for CF7 / WPForms)
   ============================================================ */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--grey-mid);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--charcoal);
  background: var(--white);
  transition: border-color var(--transition);
  outline: none;
  margin-bottom: 4px;
}
.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
  border-color: var(--blue-light);
}
.wpcf7-form input[type="submit"] {
  background: var(--orange);
  color: var(--white);
  border: none;
  padding: 12px 32px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
}
.wpcf7-form input[type="submit"]:hover {
  background: #d4840f;
  transform: translateY(-2px);
}

/* ============================================================
   SCROLL TO TOP BUTTON
   ============================================================ */
#scroll-top {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 44px; height: 44px;
  background: var(--orange);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(243,153,22,.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  z-index: 999;
  cursor: pointer;
  border: none;
}
#scroll-top.visible { opacity: 1; pointer-events: auto; }
#scroll-top:hover { transform: translateY(-3px); }
#scroll-top svg { width: 18px; height: 18px; }

/* ============================================================
   RESPONSIVE NAVIGATION
   ============================================================ */

/* Desktop : toujours visible */
@media (min-width: 769px) {
  #primary-navigation {
    display: flex !important;
    position: static;
    background: transparent;
    flex-direction: row;
    padding: 0;
    max-height: none;
    overflow: visible;
  }
  .menu-toggle { display: none !important; }
}

/* Mobile : burger menu */
@media (max-width: 768px) {
  #primary-navigation {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--blue-dark);
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 4px;
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  #primary-navigation.open { display: flex; }
  #primary-navigation a {
    padding: 12px 16px;
    font-size: .9rem;
    border-radius: var(--radius);
  }
  .menu-toggle { display: flex; }
  .hero-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   WPAUTOP / ALIGNMENT HELPERS
   ============================================================ */
.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { margin: 16px auto; text-align: center; }
.wp-caption { max-width: 100%; }
.wp-caption-text {
  font-size: .8rem;
  color: var(--grey-text);
  font-style: italic;
  text-align: center;
  margin-top: 6px;
}

/* Galerie page présentation — slider local sans dépendance externe */
.presentation-page-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
  margin: 40px 0;
}
.presentation-slider-col {
  position: relative;
  max-width: 760px;
  width: 100%;
}
.energylab-gallery {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  background: #ffffff;
  width: 100%;
}
.energylab-gallery-track {
  position: relative;
  width: 100%;
}
.energylab-gallery-slide {
  display: none;
  margin: 0;
  width: 100%;
  min-height: 320px;
  background: #ffffff;
}
.energylab-gallery-slide.is-active { display: block; }
.energylab-gallery-slide img {
  width: 100% !important;
  height: auto !important;
  max-height: 420px !important;
  object-fit: contain !important;
  object-position: center center !important;
  display: block !important;
  border: none !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  background: #ffffff !important;
}
@media (max-width: 768px) {
  .energylab-gallery-slide img {
    max-height: 320px !important;
  }
}
.energylab-gallery-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  border: none;
  color: var(--white);
  background: rgba(21,65,100,.6);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 36px;
  text-align: center;
  padding: 0;
}
.energylab-gallery-button:hover {
  background: var(--orange);
}
.energylab-gallery-button.prev { left: 12px; }
.energylab-gallery-button.next { right: 12px; }
.energylab-gallery-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  z-index: 3;
  text-align: center;
}
.energylab-gallery-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  margin: 0 4px;
  padding: 0;
  background: rgba(255,255,255,.55);
  cursor: pointer;
}
.energylab-gallery-dot.is-active,
.energylab-gallery-dot:hover {
  background: var(--orange);
}
.presentation-content-col .entry-content { padding-top: 8px; }
.presentation-slider-col { margin-top: 8px; }
.presentation-child-section { margin-top: 20px; }

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  #masthead, #scroll-top, .accent-bar, .section-chiffres { display: none; }
  body { padding-top: 0; }
  .entry-content { font-size: 12pt; }
}


/* ============================================================
   NAVIGATION — support des sous-menus
   ============================================================ */
#primary-navigation ul li { position: relative; }
#primary-navigation ul.sub-menu {
  display: none !important;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  padding: 8px !important;
  margin-top: 8px !important;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  background: rgba(21,65,100,.98) !important;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 999;
}
#primary-navigation li:hover > .sub-menu,
#primary-navigation li:focus-within > .sub-menu {
  display: flex !important;
}
#primary-navigation ul.sub-menu a {
  white-space: normal;
  font-size: .78rem;
  text-transform: none;
  padding: 10px 12px;
}
@media (max-width: 768px) {
  #primary-navigation ul,
  #primary-navigation ul#primary-menu {
    flex-direction: column;
    align-items: stretch;
  }
  #primary-navigation ul.sub-menu {
    display: flex !important;
    position: static;
    min-width: 0;
    margin-top: 0 !important;
    margin-left: 12px !important;
    padding: 4px 0 4px 12px !important;
    background: transparent !important;
    box-shadow: none;
    border-left: 2px solid rgba(255,255,255,.15);
    border-radius: 0;
  }
}

.lang-switcher a.is-active {
  color: var(--white);
  border-color: var(--orange);
  background: rgba(243,153,22,.18);
}

.energylab-accordion-trigger {
  width: 100%;
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.energylab-accordion-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.energylab-accordion-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--blue-dark);
}

.panel-title .energylab-accordion-title {
  font-size: 1rem;
}

.energylab-accordion-icon {
  display: inline-flex;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 10px solid var(--orange);
  transition: transform .25s ease;
  flex-shrink: 0;
}

.energylab-accordion-trigger[aria-expanded="true"] .energylab-accordion-icon {
  transform: rotate(180deg);
}

.energylab-accordion-content {
  display: none;
  margin-top: 14px;
}

.energylab-tab-button {
  background: transparent;
  border: 0;
  text-transform: uppercase;
  padding: 10px 16px;
  font-weight: 700;
}

.nav.nav-pills li.active .energylab-tab-button {
  color: var(--white);
}

/* ============================================================
   BOOTSTRAP-LIKE GRID (pour les templates legacy)
   ============================================================ */
.container-fluid { width: 100%; padding-left: 15px; padding-right: 15px; margin: 0 auto; }
.container-fluid.no-padding { padding: 0; }
.container.content { padding-top: 30px; padding-bottom: 30px; }
.row { display: flex; flex-wrap: wrap; margin-left: -15px; margin-right: -15px; }
.row::after { content: ''; display: table; clear: both; }

[class*="col-"] { position: relative; min-height: 1px; padding-left: 15px; padding-right: 15px; width: 100%; }

@media (min-width: 480px) {
  .col-xs-1  { flex: 0 0 8.33%;  max-width: 8.33%;  }
  .col-xs-2  { flex: 0 0 16.66%; max-width: 16.66%; }
  .col-xs-3  { flex: 0 0 25%;    max-width: 25%;    }
  .col-xs-4  { flex: 0 0 33.33%; max-width: 33.33%; }
  .col-xs-6  { flex: 0 0 50%;    max-width: 50%;    }
  .col-xs-9  { flex: 0 0 75%;    max-width: 75%;    }
  .col-xs-12 { flex: 0 0 100%;   max-width: 100%;   }
}

@media (min-width: 768px) {
  .col-sm-1  { flex: 0 0 8.33%;  max-width: 8.33%;  }
  .col-sm-2  { flex: 0 0 16.66%; max-width: 16.66%; }
  .col-sm-3  { flex: 0 0 25%;    max-width: 25%;    }
  .col-sm-4  { flex: 0 0 33.33%; max-width: 33.33%; }
  .col-sm-5  { flex: 0 0 41.66%; max-width: 41.66%; }
  .col-sm-6  { flex: 0 0 50%;    max-width: 50%;    }
  .col-sm-7  { flex: 0 0 58.33%; max-width: 58.33%; }
  .col-sm-8  { flex: 0 0 66.66%; max-width: 66.66%; }
  .col-sm-9  { flex: 0 0 75%;    max-width: 75%;    }
  .col-sm-10 { flex: 0 0 83.33%; max-width: 83.33%; }
  .col-sm-11 { flex: 0 0 91.66%; max-width: 91.66%; }
  .col-sm-12 { flex: 0 0 100%;   max-width: 100%;   }
}

@media (min-width: 992px) {
  .col-md-1  { flex: 0 0 8.33%;  max-width: 8.33%;  }
  .col-md-2  { flex: 0 0 16.66%; max-width: 16.66%; }
  .col-md-3  { flex: 0 0 25%;    max-width: 25%;    }
  .col-md-4  { flex: 0 0 33.33%; max-width: 33.33%; }
  .col-md-5  { flex: 0 0 41.66%; max-width: 41.66%; }
  .col-md-6  { flex: 0 0 50%;    max-width: 50%;    }
  .col-md-7  { flex: 0 0 58.33%; max-width: 58.33%; }
  .col-md-8  { flex: 0 0 66.66%; max-width: 66.66%; }
  .col-md-9  { flex: 0 0 75%;    max-width: 75%;    }
  .col-md-10 { flex: 0 0 83.33%; max-width: 83.33%; }
  .col-md-11 { flex: 0 0 91.66%; max-width: 91.66%; }
  .col-md-12 { flex: 0 0 100%;   max-width: 100%;   }
}

/* ============================================================
   UTILITAIRES BOOTSTRAP-LIKE (pour les templates legacy)
   ============================================================ */
.img-responsive { display: block; max-width: 100%; height: auto; }
.img-center { margin-left: auto; margin-right: auto; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt20 { margin-top: 20px; }
.mb20 { margin-bottom: 20px; }
.no-padding { padding: 0; }

hr.orangehr {
  border: 0;
  border-top: 2px solid var(--orange);
  margin: 20px 0;
}
hr.blackhr {
  border: 0;
  border-top: 1px solid var(--charcoal);
  margin: 10px 0;
}

/* Panels (Bootstrap 3 accordion compat) */
.panel-group { margin-bottom: 20px; }
.panel { border: 1px solid var(--grey-mid); border-radius: 4px; margin-bottom: 4px; background: var(--white); }
.panel-default { border-color: var(--grey-mid); }
.panel-heading { padding: 10px 15px; background: var(--grey-light); border-bottom: 1px solid var(--grey-mid); border-radius: 4px 4px 0 0; }
.panel-title { margin: 0; font-size: 1rem; font-weight: 600; }
.panel-title a,
.panel-title button { color: var(--blue-dark); text-decoration: none; display: block; width: 100%; text-align: left; background: none; border: none; cursor: pointer; font: inherit; padding: 0; }
.panel-title a:hover,
.panel-title button:hover { color: var(--orange); }
.panel-body { padding: 15px; }
.panel-collapse { overflow: hidden; }
.panel-collapse.collapse { display: none; }
.panel-collapse.collapse.in { display: block; }

/* Nav pills (Bootstrap 3 compat) */
.nav { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.nav-pills { gap: 4px; }
.nav-pills > li > a,
.nav-pills > li > button { display: block; padding: 8px 16px; border-radius: 4px; background: var(--grey-light); color: var(--blue-dark); text-decoration: none; font-weight: 600; font-size: .9rem; border: none; cursor: pointer; text-transform: uppercase; }
.nav-pills > li > a:hover,
.nav-pills > li > button:hover { background: var(--blue-dark); color: var(--white); }
.nav-pills > li.active > a,
.nav-pills > li.active > button { background: var(--blue-dark); color: var(--white); }

/* Tab content (Bootstrap 3 compat) */
.tab-content > .tab-pane { display: none; }
.tab-content > .tab-pane.active { display: block; }
.tab-content > .tab-pane.fade { opacity: 0; transition: opacity .15s ease; }
.tab-content > .tab-pane.fade.in { opacity: 1; }

/* Modals (Bootstrap 3 compat) */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 10050; background: rgba(0,0,0,.5); overflow-y: auto; }
.modal.fade.in { display: flex; align-items: center; justify-content: center; }
.modal-dialog { max-width: 600px; width: 90%; margin: 30px auto; }
.modal-content { background: var(--white); border-radius: 8px; overflow: hidden; box-shadow: 0 4px 24px rgba(0,0,0,.3); }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--grey-mid); }
.modal-header .close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--grey-text); }
.modal-title { margin: 0; font-size: 1.1rem; font-weight: 600; }
.modal-body { padding: 16px; }
.modal-footer { padding: 12px 16px; border-top: 1px solid var(--grey-mid); text-align: right; }

.HiddenModal { position: absolute; overflow: hidden; clip: rect(0,0,0,0); width: 0; height: 0; }

/* Image hover effect */
.image-hover { cursor: pointer; }
.image-hover img { transition: transform .2s ease, box-shadow .2s ease; }
.image-hover:hover img { transform: scale(1.03); box-shadow: 0 4px 12px rgba(0,0,0,.15); }

/* Glyphicon replacement — triangle */
.glyphicon-triangle-bottom::before { content: '\25BC'; font-size: .7em; margin-right: 6px; color: var(--orange); }

/* Search results */
.search-results-list { list-style: none; padding: 0; }
.search-results-list li { padding: 8px 0; border-bottom: 1px solid var(--grey-mid); }
.search-results-list li a { color: var(--blue-dark); font-weight: 600; text-decoration: none; }
.search-results-list li a:hover { color: var(--orange); }

/* Pagination */
.page-numbers { display: inline-block; padding: 6px 12px; margin: 2px; border: 1px solid var(--grey-mid); border-radius: 4px; color: var(--blue-dark); text-decoration: none; font-size: .9rem; }
.page-numbers:hover { background: var(--blue-dark); color: var(--white); border-color: var(--blue-dark); }
.page-numbers.current { background: var(--orange); color: var(--white); border-color: var(--orange); }
.page-numbers.dots { border: none; background: none; }

/* Member details */
.member-details p { margin: 6px 0; line-height: 1.6; }
.member-details strong { color: var(--blue-dark); margin-right: 4px; }

/* Sidebar for legacy templates */
.sidebar .sidebar-widget-title { font-size: 1rem; font-weight: 700; color: var(--blue-dark); text-transform: uppercase; margin-bottom: 12px; }

/* Breadcrumb */
.energylab-breadcrumb { font-size: .85rem; margin-bottom: 16px; color: var(--grey-text); }
.energylab-breadcrumb a { color: var(--blue-dark); text-decoration: none; }
.energylab-breadcrumb a:hover { color: var(--orange); }

/* Bouton retour parent */
.energylab-back-link {
  margin-bottom: 16px;
}
.energylab-back-link .btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .85rem;
  padding: 6px 14px;
  border: 1px solid var(--blue-dark);
  color: var(--blue-dark);
  border-radius: 4px;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.energylab-back-link .btn:hover {
  background: var(--blue-dark);
  color: var(--white);
}

/* Logos / images dans le contenu des pages : affichage en ligne */
.tab-pane .entry-content img,
.tab-pane > .row img,
.panel-body img,
.energylab-accordion-content img,
.energylab-tab-content img {
  display: inline-block;
  vertical-align: middle;
  max-height: 120px;
  width: auto;
  margin: 8px 16px 8px 0;
}

/* Sauf les images explicitement pleine largeur */
.tab-pane .entry-content img.size-full,
.tab-pane .entry-content img.size-large,
.panel-body img.size-full,
.panel-body img.size-large,
.energylab-accordion-content img.size-full,
.energylab-accordion-content img.size-large,
.energylab-tab-content img.size-full,
.energylab-tab-content img.size-large {
  display: block;
  max-height: none;
  width: auto;
  max-width: 100%;
  margin: 16px 0;
}

/* Container pour images WordPress alignées côte à côte */
.tab-pane p > img,
.panel-body p > img,
.energylab-accordion-content p > img {
  display: inline-block;
  vertical-align: middle;
}

/* ============================================================
   MEMBERS CARDS (page-membres.php) — grille 2 colonnes
   ============================================================ */
.member-card {
  border: 1px solid var(--grey-mid);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 20px;
  background: var(--white);
  transition: box-shadow .2s ease;
}
.member-card:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.member-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.member-card-photo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.member-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-dark);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
}
.member-card-header .energylab-accordion-trigger {
  flex: 1;
}
.member-card .member-details {
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--grey-mid);
}


/* ============================================================
   RESPONSIVE : OS grille 3 colonnes + highlight H2
   ============================================================ */
.axes-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.axe-card-highlight {
  border-top: 4px solid var(--orange);
  background: linear-gradient(180deg, rgba(243,153,22,.06) 0%, var(--white) 40%);
}
.axe-card-highlight .axe-icon {
  background: linear-gradient(135deg, var(--orange), #e8850a);
}

/* ============================================================
   RESPONSIVE : Header — taille fluide desktop
   ============================================================ */
#primary-navigation a {
  font-size: clamp(0.55rem, 0.75vw, 0.72rem);
  padding: 5px clamp(3px, 0.35vw, 7px);
}
.lang-switcher a {
  font-size: clamp(0.6rem, 0.8vw, 0.78rem);
  padding: 3px 6px;
}

/* ============================================================
   RESPONSIVE : Logos partenaires — wrap si trop petit
   ============================================================ */
.partners-logos {
  gap: clamp(12px, 2.5vw, 40px);
}
.partners-logos img {
  height: clamp(35px, 4.5vw, 55px);
}

/* ============================================================
   RESPONSIVE : Photo présentation — proportion conservée
   ============================================================ */
.presentation-image-main {
  height: auto;
  max-height: 420px;
  width: 100%;
  aspect-ratio: 4 / 3;
}

/* ============================================================
   RESPONSIVE : Scroll-top position
   ============================================================ */
#scroll-top {
  bottom: 80px;
}

/* ============================================================
   RESPONSIVE : Tablette (< 1100px)
   ============================================================ */
@media (max-width: 1100px) {
  #primary-navigation a {
    font-size: 0.56rem;
    padding: 4px 3px;
    letter-spacing: 0;
  }
}

/* ============================================================
   RESPONSIVE : Mobile (< 768px)
   ============================================================ */
@media (max-width: 768px) {
  /* Hero */
  .hero { min-height: auto; padding: 50px 0 30px; }
  .hero-title { font-size: 1.4rem !important; }
  .hero-description { font-size: .82rem; }
  .hero-grid { gap: 20px; }
  .hero-stat-card { padding: 10px 12px; min-width: 70px; }
  .hero-stat-number { font-size: 1.2rem; }
  .hero-stat-label { font-size: .6rem; }
  .hero-actions { flex-direction: column; gap: 8px; }
  .hero-actions .btn { width: 100%; text-align: center; font-size: .78rem; padding: 10px 14px; }
  .hero-eyebrow { font-size: .6rem; padding: 4px 10px; }

  /* OS grille 1 colonne */
  .axes-grid-3 { grid-template-columns: 1fr; }

  /* Grille membres 1 colonne */
  .col-md-6 { flex: 0 0 100%; max-width: 100%; }

  /* Ticker */
  .accent-bar-inner { font-size: .65rem; flex-wrap: wrap; }
  .accent-bar-inner span { flex: 0 0 auto; padding: 8px 12px; }

  /* Sections */
  .section-title { font-size: 1.3rem; }
  .section-header { flex-direction: column; gap: 12px; }

  /* Photo présentation — proportionnelle */
  .presentation-image-main { height: auto; max-height: none; aspect-ratio: 4 / 3; }

  /* Logos partenaires — wrap sur mobile */
  .partners-logos { flex-wrap: wrap; justify-content: center; }
  .partners-logos img { height: 40px; }

  /* Footer */
  .footer-main { flex-direction: column; gap: 20px; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 6px; }

  /* Images dans contenu — s'adaptent */
  .entry-content img,
  .tab-pane img,
  .panel-body img,
  .energylab-accordion-content img {
    max-width: 100% !important;
    height: auto !important;
    width: auto !important;
  }
  .tab-pane .entry-content img,
  .panel-body img,
  .energylab-accordion-content img,
  .energylab-tab-content img {
    max-height: none !important;
    height: auto !important;
    max-width: 100%;
    margin: 8px auto;
  }
  /* Images seules (pas dans un tableau ou galerie) — en block */
  .tab-pane .entry-content > p > img:only-child,
  .panel-body > .row img.img-responsive,
  .energylab-accordion-content > p > img:only-child {
    display: block !important;
    margin: 8px auto;
  }
  /* Galeries d'images côte à côte — rester inline, réduire */
  .tab-pane .entry-content table img,
  .panel-body table img,
  .tab-pane p > img,
  .panel-body p > img {
    display: inline-block !important;
    max-width: 45%;
    height: auto !important;
    vertical-align: top;
    margin: 4px 2px;
  }

  /* Nav pills — wrap en colonnes sur mobile */
  .nav-pills {
    flex-wrap: wrap;
    gap: 4px;
  }
  .nav-pills > li { flex: 0 0 auto; }
  .nav-pills > li > a,
  .nav-pills > li > button {
    white-space: normal;
    font-size: clamp(0.6rem, 2.5vw, 0.75rem);
    padding: 6px 10px;
    text-align: center;
  }
  .energylab-tab-nav .energylab-tab-button {
    font-size: clamp(0.6rem, 2.5vw, 0.75rem);
    padding: 6px 10px;
    white-space: normal;
  }

  /* Présentation page grille */
  .presentation-page-grid { grid-template-columns: 1fr !important; }

  /* Tables et contenus larges — scroll horizontal visible sur mobile */
  .container.content {
    overflow-x: hidden;
  }
  .entry-content,
  .panel-body,
  .tab-pane,
  .energylab-accordion-content,
  .energylab-tab-content,
  .tab-content,
  .col-sm-12,
  .panel-collapse {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    max-width: 100vw;
  }
  /* Les .row ne doivent pas cacher le scroll */
  .panel-body .row,
  .tab-pane .row,
  .energylab-accordion-content .row {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }
  /* Scrollbar visible */
  .entry-content::-webkit-scrollbar,
  .panel-body::-webkit-scrollbar,
  .tab-pane::-webkit-scrollbar,
  .energylab-accordion-content::-webkit-scrollbar,
  .col-sm-12::-webkit-scrollbar,
  .panel-collapse::-webkit-scrollbar,
  .panel-body .row::-webkit-scrollbar {
    height: 6px;
  }
  .entry-content::-webkit-scrollbar-thumb,
  .panel-body::-webkit-scrollbar-thumb,
  .tab-pane::-webkit-scrollbar-thumb,
  .energylab-accordion-content::-webkit-scrollbar-thumb,
  .col-sm-12::-webkit-scrollbar-thumb,
  .panel-collapse::-webkit-scrollbar-thumb,
  .panel-body .row::-webkit-scrollbar-thumb {
    background: var(--orange);
    border-radius: 3px;
  }
  .entry-content::-webkit-scrollbar-track,
  .panel-body::-webkit-scrollbar-track,
  .tab-pane::-webkit-scrollbar-track,
  .energylab-accordion-content::-webkit-scrollbar-track,
  .col-sm-12::-webkit-scrollbar-track,
  .panel-collapse::-webkit-scrollbar-track,
  .panel-body .row::-webkit-scrollbar-track {
    background: var(--grey-mid);
    border-radius: 3px;
  }
  .entry-content table,
  .panel-body table,
  .tab-pane table,
  .energylab-accordion-content table {
    width: auto !important;
    min-width: 580px !important;
    max-width: none !important;
    font-size: .75rem;
    table-layout: auto !important;
  }
  .entry-content td,
  .panel-body td,
  .tab-pane td,
  .energylab-accordion-content td {
    width: auto !important;
    min-width: 0 !important;
    padding: 6px 8px;
    font-size: .72rem;
    white-space: normal;
    word-break: break-word;
  }
  .entry-content th,
  .panel-body th,
  .tab-pane th,
  .energylab-accordion-content th {
    width: auto !important;
    min-width: 0 !important;
    padding: 6px 8px;
    font-size: .72rem;
    white-space: nowrap;
  }
  /* Images dans les cellules — pas de largeur fixe inline */
  .entry-content td img,
  .panel-body td img,
  .tab-pane td img {
    width: auto !important;
    height: auto !important;
    max-width: 120px;
    max-height: 90px;
    object-fit: contain;
  }

  /* Images dans galeries/tableaux plateformes — proportionnelles */
  .entry-content table img,
  .panel-body table img,
  .tab-pane table img,
  .energylab-accordion-content table img {
    max-width: 100%;
    height: auto !important;
    width: auto !important;
  }
  
  /* Galeries WordPress inline */
  .gallery,
  .wp-block-gallery {
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px;
  }
  .gallery-item,
  .wp-block-image {
    flex: 0 0 calc(50% - 4px);
    max-width: calc(50% - 4px);
  }
  .gallery-item img,
  .wp-block-image img {
    width: 100%;
    height: auto;
  }

  /* Equipements et accordion items — images au dessus */
  .energylab-equipment-item .col-sm-3,
  .panel-body .row .col-sm-3 {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 10px;
  }
  .energylab-equipment-item .col-sm-9,
  .panel-body .row .col-sm-9 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Equipements images */
  .panel-body .row .col-sm-3 img,
  .energylab-equipment-item .col-sm-3 img {
    max-height: 180px;
    width: 100%;
    object-fit: cover;
    border-radius: 6px;
  }
}

/* ============================================================
   RESPONSIVE : Petit mobile (< 480px)
   ============================================================ */
@media (max-width: 480px) {
  .hero { padding: 40px 0 20px; }
  .hero-title { font-size: 1.2rem !important; }
  .container.content { padding-top: 12px; padding-bottom: 12px; }
  .axe-card { padding: 18px 14px; }
  .member-card { padding: 10px; }
  .member-card-photo { width: 36px; height: 36px; }
  .partners-logos img { height: 32px; }
  .energylab-breadcrumb { font-size: .7rem; }
  .news-grid { grid-template-columns: 1fr !important; }
  .chiffres-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 16px; }
}
