/* ====================
   VARIABLES & ROOT
   ==================== */
:root {
  /* Couleurs */
  --bg: #ffffff;
  --text: #333333;
  --menu-bg: #eeeeee;
  --menu-text: #000000;
  --link-color: #800000;
--link-hover: #ff6666
  
  /* Hauteurs pour le header sticky */
  --header-height: 70px;
  --header-height-mobile: 60px;
}

[data-theme="dark"] {
  --bg: #111111;
  --text: #dddddd;
  --menu-bg: #222222;
  --menu-text: #ffffff;
  --link-color: #cc4444;
  --link-hover: #ff6666;
}

/* ====================
   BASE STYLES
   ==================== */
* {
  font-family: 'Raleway', sans-serif;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  padding: 0;
  padding-top: var(--header-height); /* Compenser le header fixe */
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Raleway', sans-serif;
  transition: background-color 0.3s, color 0.3s;
  overflow-x: hidden;
  line-height: 1.5;
  min-width: 320px;
}

/* ====================
   LAYOUT STRUCTURE
   ==================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.container.one-col {
  display: block;
}

.container.two-cols {
  display: flex;
  gap: 30px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 30px;
}

.col-1, .col-2 {
  text-align: justify;
  hyphens: auto;
  line-height: 1.6;
}

.col-2 {
  flex: 1 1 calc(50% - 15px);
}

/* ====================
   TYPOGRAPHY
   ==================== */
h1 {
  font-size: clamp(1.8rem, 5vw, 2.2rem);
  font-weight: 300;
  text-align: left;
  position: relative;
  padding-top: 20px;
  line-height: 1.2;
}

h2 { 
  font-size: clamp(1.2rem, 3.5vw, 1.5rem); 
  font-weight: 700; 
  text-align: left;
  line-height: 1.2;
}

h3 { 
font-size: clamp(1.1rem, 1.3rem, 1.5rem);
  font-weight: 600;
  margin: 0.8rem 0 0.3rem 1rem;
}

h4 { 
font-size: clamp(1.1rem, 1.3rem, 1.5rem);
  font-weight: 600;
  margin: 0 !important;
}


.text, .intro, .text-col {
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  line-height: 1.6;
  margin: 1rem 0;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.text-citation {
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  line-height: 1.4;
  font-style: italic;
  margin: 0.5rem 0 0.5rem 0.5rem;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.auteur {
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  font-weight: 600;
  margin: 0; IMPORTANT!
}

.cie {
  font-size: clamp(0.85rem, 2.2vw, 0.95rem);
  font-weight: 500;
  margin: 0.3rem 0 1rem 1rem;
  opacity: 0.8;
}


/* ====================
   HEADER & NAVIGATION - STICKY
   ==================== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  position: fixed; /* Header sticky */
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  box-sizing: border-box;
  min-height: var(--header-height);
  z-index: 1000; /* Au-dessus de tout le contenu */
  
  /* Fond avec transparence et effet moderne */
  background-color: rgba(var(--bg-rgb, 255, 255, 255), 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  
  /* Bordure en bas 
  border-bottom: 1px solid #800000;*/
  
  /* Transition douce */
  transition: all 0.3s ease;
}

header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #800000;
  width: 100%;
}
/* Couleurs de fond selon le thème */
[data-theme="dark"] header {
  background-color: rgba(17, 17, 17, 0.95);
  --bg-rgb: 17, 17, 17;
}

[data-theme="light"] header {
  background-color: rgba(255, 255, 255, 0.95);
  --bg-rgb: 255, 255, 255;
}

.logo {
  height: 60px;
  flex-shrink: 0;
}

.header-buttons {
  display: flex;
  gap: 0.3rem;
  position: relative;
  align-items: center;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

/* Boutons header */
#toggle-theme, #toggle-langue, #menu-toggle {
  cursor: pointer;
  background: none;
  border: none;
  color: var(--text);
  padding: 0.1rem 0.1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.2s, color 0.2s;
  white-space: nowrap;
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* renfort */
#toggle-theme, #toggle-langue { border: none !important; box-shadow: none; }


#toggle-theme:hover, #toggle-langue:hover, #menu-toggle:hover,
#toggle-theme:focus, #toggle-langue:focus, #menu-toggle:focus {
  background-color: var(--text);
  color: var(--bg);
  outline: none;
}

/* Menu burger */
#burger-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
background: rgba(240, 240, 240, 0.7);
  padding: 8px 0;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  min-width: 200px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  white-space: nowrap;
}

[data-theme="dark"] #burger-menu {
  background: rgba(42, 42, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}


#burger-menu.show {
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.25s ease-out;
}

#burger-menu a {
  display: block;
  color: #333 !important;
  text-decoration: none;
  font-weight: 500;
  padding: 12px 20px;
  margin: 0;
  transition: background 0.2s;
  font-size: 0.95em;
  text-align: left;
}

[data-theme="dark"] #burger-menu a {
  color: #ededed !important;
}

#burger-menu a:hover,
#burger-menu a:focus {
  background: rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] #burger-menu a:hover,
[data-theme="dark"] #burger-menu a:focus {
  background: rgba(255, 255, 255, 0.1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ====================
   LINKS & BUTTONS
   ==================== */
a {
  text-decoration: none;
  color: var(--link-color);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--link-hover);
}

/* Liens avec icônes */
a[href^="mailto:"], a[href^="tel:"], a[href^="https://wa.me"] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  padding: 8px 12px;
  border-radius: 4px;
  min-height: 44px;
}

/* Conteneurs sociaux */
.whatsapp-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}

.social-icons {
  display: flex;
  gap: 8px;
  margin: 15px 0;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 8px;
}

/* ====================
   RESPONSIVE BREAKPOINTS
   ==================== */
/* Tablette - 768px et plus */
@media (min-width: 768px) {
  :root {
    --header-height: 100px; /* Header plus grand sur tablette/desktop */
  }
  
  body {
    padding-top: var(--header-height);
  }
  
  main {
    margin-left: 30px;
    margin-right: 30px;
  }
  
  header {
    padding: 1rem 2rem;
    min-height: var(--header-height);
  }
  
  .logo {
    height: 80px;
  }
  
  .header-buttons {
    gap: 0.5rem;
  }
  
  #toggle-theme, #toggle-langue, #menu-toggle {
    padding: 0.1rem 0.1em;
    font-size: 1rem;
  }
  
  .container.two-cols {
    gap: 50px;
  }
  
  .row {
    gap: 50px;
  }
}

/* Desktop - 1024px et plus */
@media (min-width: 1024px) {
  :root {
    --header-height: 110px; /* Header encore plus grand sur desktop */
  }
  
  body {
    padding-top: var(--header-height);
  }
  
  main {
    margin-left: 50px;
    margin-right: 50px;
  }
  
  header {
    min-height: var(--header-height);
  }
  
  .logo {
    height: 90px;
  }
  
  .header-buttons {
    gap: 1rem;
  }
  
  #toggle-theme, #toggle-langue, #menu-toggle {
    padding: 0.1rem 0.1rem;
  }
  
  .row {
    gap: 80px;
  }
}

/* Mobile - 767px et moins */
@media (max-width: 767px) {
  body {
    padding-top: var(--header-height-mobile); /* Padding mobile spécifique */
  }
  
  /* Header mobile */
  header {
    padding: 0.5rem;
    min-height: var(--header-height-mobile);
  }
  
  .logo {
    height: 50px;
  }
  
  .header-buttons {
    gap: 0.2rem;
  }
  
  #toggle-theme, #toggle-langue, #menu-toggle {
    padding: 0.6rem 0.8rem !important;
    font-size: 1rem !important;
    min-height: 48px !important;
    min-width: 48px !important;
  }
  
  /* Menu burger responsive */
  #burger-menu {
    right: 0.5rem;
    min-width: calc(100vw - 2rem);
    max-width: calc(100vw - 2rem);
  }
  
  #burger-menu a {
    font-size: 1.1rem !important;
    padding: 1rem 1.5rem !important;
  }
  
  /* Layout mobile */
  .container.two-cols {
    flex-direction: column;
    gap: 20px;
    padding: 0 15px;
  }
  
  .row {
    flex-direction: column;
    gap: 20px;
  }
  
  .col-1, .col-2 {
    width: 100%;
  }
  
  /* Textes mobile */
  h1 {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
    margin: 1rem 0 0.8rem 0;
  }
  
  .text, .intro, .text-col, .text-citation {
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  line-height: 1.4;
  font-style: italic;
  margin: 0.5rem 0 0.5rem 0.5rem;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}
  
  main {
    margin-left: 10px;
    margin-right: 10px;
    padding: 0.5rem 0;
  }
}

/* Très petits écrans - 480px et moins */
@media (max-width: 480px) {
  main {
    margin-left: 8px;
    margin-right: 8px;
  }
  
  header {
    padding: 0.3rem;
  }
  
  .header-buttons {
    gap: 0.1rem;
  }
  
  #toggle-theme, #toggle-langue {
    font-size: 0.9rem !important;
    padding: 0.5rem 0.7rem !important;
    min-height: 44px !important;
    min-width: 44px !important;
  }
  
  #menu-toggle {
    font-size: 1rem !important;
  }
  
  .logo {
    height: 45px;
  }
  
  #burger-menu {
    right: 0.3rem;
    min-width: calc(100vw - 1.5rem);
    max-width: calc(100vw - 1.5rem);
  }
  
  .text, .intro, .text-col, .text-citation {
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  line-height: 1.4;
  font-style: italic;
  margin: 0.5rem 0 0.5rem 0.5rem;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}
  
  .auteur, .cie {
    margin-left: 10px;
  }
}
/* === FORCE ABSOLUE STYLES BOUTON MENU - NE PAS TOUCHER === */
#menu-toggle {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 50px !important;
  min-width: 55px !important;
  padding: 0.4rem 0.6rem !important;
  gap: 3px !important;
  line-height: 1 !important;
}

.hamburger-icon {
  width: 38px !important;
  height: 18px !important;
  position: relative !important;
  display: block !important;
  transform: none !important;
  background-image: linear-gradient(to bottom, var(--text) 8px, var(--text) 10px);
  background-repeat: no-repeat;
  background-size: 100% 2px;   /* épaisseur du trait central */
  background-position: 0 8px;  /* position du trait central = espace entre lignes */
}
.hamburger-icon::before,
.hamburger-icon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}
.hamburger-icon::before { top: 0; }     /* trait du haut */
.hamburger-icon::after  { bottom: 0; }  /* trait du bas */


.menu-text {
  font-size: 0.7em !important;
  font-weight: 300 !important;  /* plus léger que normal (400) */
  text-transform: uppercase !important;
  display: block !important;
  line-height: 1 !important;
  text-align: center !important; /* Centre le texte horizontalement */
  width: 100% !important; /* Assure que l'élément prend toute la largeur disponible */
}

/* Mobile override absolu */
@media (max-width: 480px) {
  #menu-toggle {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;                  /* plus besoin d’espace si icône absente */
    min-height: 46px !important;
    min-width: 50px !important;
  }

  .menu-text {
    font-size: 0.9em !important;
  }
}
/* Réduire l'espace entre les boutons du header */
.header-buttons {
  display: flex;
  gap: 0.2em; /* Réduit de 1em à 0.5em */
  align-items: center;
}

/* Alternative si .header-buttons n'existe pas encore */
.top-btn-group {
  display: flex;
  gap: 0.5em; /* Réduit de 1em à 0.5em */
}

/* Forcer le texte en minuscules pour tous les boutons du header */
#toggle-langue,
#toggle-theme,
.toggle-btn {
  text-transform: lowercase !important;
}

/* Si vous avez besoin d'une approche plus globale */
header button {
  text-transform: lowercase !important;
}
/* Mode sombre : hamburger noir uniquement au hover */
[data-theme="dark"] #menu-toggle:hover .hamburger-icon,
[data-theme="dark"] #menu-toggle:focus .hamburger-icon {
  background-image: linear-gradient(to bottom, #000000 8px, #000000 10px) !important;
}

[data-theme="dark"] #menu-toggle:hover .hamburger-icon::before,
[data-theme="dark"] #menu-toggle:hover .hamburger-icon::after,
[data-theme="dark"] #menu-toggle:focus .hamburger-icon::before,
[data-theme="dark"] #menu-toggle:focus .hamburger-icon::after {
  background: #000000 !important;
}
/* Mode clair : hamburger blanc uniquement au hover */
[data-theme="light"] #menu-toggle:hover .hamburger-icon,
[data-theme="light"] #menu-toggle:focus .hamburger-icon {
  background-image: linear-gradient(to bottom, #ffffff 8px, #ffffff 10px) !important;
}

[data-theme="light"] #menu-toggle:hover .hamburger-icon::before,
[data-theme="light"] #menu-toggle:hover .hamburger-icon::after,
[data-theme="light"] #menu-toggle:focus .hamburger-icon::before,
[data-theme="light"] #menu-toggle:focus .hamburger-icon::after {
  background: #ffffff !important;
}
