:root{
  --bg: #F7F6F4;
  --text: #000;
  --muted: #666a6d;
  --teal: #3a6e7f;
  --pill: #cfd3d6;
  --accent: #ed7a0a;
  --rich: #b95530;
  --radius: 12px;
  --container: 1200px;
  --shadow-soft: 0 6px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.06);
  --tracking: 0.02em; /* espacement global des caractères */
  --bg-50: #F7F6F480;   /* 50% transparent */
  --bg-80: #F7F6F4CC;   /* ~80% opaque */
  --bg-92: #F7F6F4EB;   /* ~92% opaque */
  --accent2: #309802;
}

/* Import des polices */
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap");

*{ box-sizing: border-box }
html,body{ height:100% }
body{
  margin:0;
  color:var(--text);
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height:1.5;

  background-color: var(--bg);
  /* Fond: uniquement V5 */
  background-image: url("../assets/images/usine avec fond V4.png");
  background-repeat: no-repeat;
  background-position: top right;
  background-size: 100% auto;
  background-attachment: fixed;
}

/* Désactive l’ancien voile qui recouvrait le texte */
body::before{ content:none; display:none; }

/* Assure que le contenu passe au-dessus du voile */
.site-header{ position: relative; z-index: 3; }
.hero-content{ position: relative; z-index: 2; }

img{height:auto; display:block }
a{ color:inherit; text-decoration:none }

.skip-link{ position:absolute; left:-9999px }
.skip-link:focus{ left:8px; top:8px; background:#000; color:#fff; padding:8px 10px; border-radius:8px }

.container{
  /* aligner tout le contenu à gauche de l’écran */
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 24px;          /* garde une gouttière de 24px */
}
@media (max-width: 768px) {
  .container {
    padding: 0;           /* pas de padding sur mobile pour 100% width */
  }
}
/* Header */
.site-header{ position: relative; z-index: 3; }
.site-header .container{
  display:flex; align-items:flex-start; justify-content:space-between; gap:16px;
  padding-top:18px; padding-bottom:8px; /* garde 24px à gauche via .container */
}
.brand{ 
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.brand-title{ display:block; font-weight:700; font-size:22px; letter-spacing:.2px }
.brand-subtitle{ display:block; font-size:14px; color:var(--muted); margin-top:2px }

.brand-petition{ 
  display:inline-flex; 
  align-items:center;
  gap:4px;
  font-size:13px; 
  color:var(--accent); 
  margin-top:4px; 
  font-weight:700; 
  transition:color 0.2s ease;
  white-space: nowrap;
}
.content-block .brand-petition{ font-size: inherit; margin:8px 0 }
.petition-heart{ flex-shrink:0; }
.brand-petition:hover{ color:var(--teal); }
.top-nav{ margin-top:0px; }
.nav-list{ list-style:none; display:flex; gap:16px; margin:0; padding:0 }

/* Wrapper pour grouper bouton accueil + menu */
.nav-wrapper{
  display:flex;
  align-items:center;
  gap:12px;
  flex: 0 0 auto;
  margin-top: 0;
}

/* Home button + hamburger group */
.nav-controls{
  display:flex;
  align-items:center;
  gap:12px;
}

/* Menu hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-top: 4px;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.line {
  width: 24px;
  height: 2px;
  background-color: var(--teal);
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Animation hamburger quand ouvert */
.menu-toggle.active .line-1 {
  transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active .line-2 {
  opacity: 0;
}

.menu-toggle.active .line-3 {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* Sur mobile, afficher le bouton hamburger et cacher le menu */
@media (max-width: 768px) {
  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .nav-wrapper {
    order: -1;
    align-self: flex-start;
  }

  .nav-controls{ gap:10px; }

  .menu-toggle {
    display: flex;
  }

  .top-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg);
    border-bottom: 1px solid var(--pill);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    z-index: 10;
  }

  .top-nav.open {
    max-height: 300px;
    padding: 16px 24px;
  }

  .nav-list {
    flex-direction: column;
    gap: 12px;
  }

  .pill {
    display: block;
    padding: 12px 16px;
    background-color: var(--pill);
    border-radius: var(--radius);
    text-align: center;
    transition: all 0.2s ease;
  }

  .pill:hover {
    background-color: var(--teal);
    color: white;
  }

  .pill.is-active {
    background-color: var(--teal);
    color: white;
  }

  .pill--accent {
    background-color: var(--accent);
    color: white;
  }

  .pill--accent:hover {
    background-color: var(--rich);
  }
}
.pill{
  display:inline-block;
  padding:10px 22px;
  border-radius: 10px; /* avant: 999px */
  background: var(--pill);
  color:#2f2f2f;
  border:1px solid #b9bfc4;
  box-shadow: var(--shadow-soft);
  font-weight:700;
}
.pill:hover{ filter:brightness(1.03) }
.pill.is-active{ background:var(--teal); color:#fff; border-color:#2f5966 }
.pill--accent{ background: var(--accent); color:#fff; border-color:#c96508 }

/* Lien accueil avec icone */
.home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  border: 2px solid var(--teal);
  transition: all 0.2s ease;
}

.home-icon {
  width: 24px;
  height: 24px;
  fill: var(--bg);
  stroke: var(--teal);
  stroke-width: 2;
  transition: all 0.2s ease;
}

.home-link:hover {
  border-color: var(--bg);
}

.home-link:hover .home-icon {
  fill: var(--teal);
  stroke: var(--bg);
}

@media (max-width: 768px) {
  .home-link {
    width: 40px;
    height: 40px;
    border-width: 1.5px;
  }

  .home-icon {
    width: 22px;
    height: 22px;
  }
}

/* Hero */
.hero{
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  min-height: auto;           /* ne pas dépasser les boutons */
  margin-bottom: 40px;
  cursor: pointer;
}
.hero-content{
  position: relative; z-index: 2;
  max-width: 60%;
  padding: 8px 0 0;           /* pas de padding bas pour coller les blocs */
}
.hero h1{
  font-weight:700;
  font-size:clamp(28px, 4vw, 44px);
  line-height:1.2;
  margin:16px 0 8px;
  color:#2f6474;
  /* filet d’ombre claire pour lisibilité sur le visuel de fond */
  text-shadow: 0 2px 14px var(--bg), 0 4px 22px var(--bg);
}
.hero p{
  margin:0 0 10px;
  color:var(--text);
  font-weight:500;
  font-stretch: 90%;
  font-style: italic;
  /* halo léger pour lisibilité sur fond visuel */
  text-shadow: 0 1px 8px var(--bg), 0 2px 14px var(--bg);
}

/* Illustration fixe en haut-droite, échelle fluide (comme la maquette) */
.hero-art{
  position: fixed;
  top: 0;
  right: 0;
  width: clamp(620px, 47vw, 980px);  /* ajuste l’échelle ici si besoin */
  height: auto;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.08) 18%, rgba(0,0,0,1) 40%);
          mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.08) 18%, rgba(0,0,0,1) 40%);
}

@media (max-width: 900px){
  .hero-art{ width: 60vw }
}
@media (max-width: 700px){
  .hero-art{ display:none }
}

/* Boutons */
.actions{
  display: flex;
  flex-direction: column;   /* empile les boutons */
  gap: 12px;
  max-width: 360px;
  width: 100%;
  margin-top : 20px;
  font-weight:700;
}
@media (min-width:600px){
  /* rester en colonne aussi sur grands écrans */
  .actions{ flex-direction: column }
}
.btn{
  display:inline-block;
  width:100%;
  padding:12px 16px;
  border-radius: 10px;
  border:1px solid #c9cbcf;
  font-weight:700;
  box-shadow: var(--shadow-soft);
}
.btn--secondary{ background:#d9dbde; color:#2b2b2b }
.btn--secondary:hover{ filter:brightness(1.03) }
.btn--primary{ background:var(--accent); color:#fff; border-color:#c96508 }
.btn--primary:hover{ filter:brightness(1.05) }
.btn--teal{ background: var(--teal); color:#fff; border-color:#2f5966 }
.btn--teal:hover{ filter: brightness(1.05) }

/* Footer */
.site-footer{ padding:28px 24px; text-align:center; color:var(--muted) }
.site-footer p{ margin: 0 }
.site-footer .footer-note{ margin-bottom: 6px; text-align:center; font-size:14px }
.site-footer .brand-petition{ font-size:.8em }
.site-footer .footer-note__lead{ color: var(--accent); font-weight: 700 }
.site-footer .footer-note__email{ color: var(--accent); font-weight: 700 }

/* Responsive */
@media (max-width: 900px){
  .hero-art{ width: 60vw; height: 70vh; background-size: 80% }
}
@media (max-width: 700px){
  .hero-art{ display: none }
}

.summary-section{ padding-top: 16px; padding-bottom: 24px }
.summary-grid{
  display: grid;
  grid-template-columns: 1fr;     /* mobile: 1 colonne */
  gap: 16px;
  align-items: stretch;
}
@media (min-width: 1024px){
  .summary-grid{ grid-template-columns: repeat(3, minmax(0,1fr)) }  /* ordi: 3 colonnes */
}

/* Cartes (résumés) */
.card{
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 10px;
  background: var(--bg-50);
  /* supprimé la bordure */
  /* border: 1px solid #d7dadf; */
  box-shadow: 0 6px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.06);
  backdrop-filter: blur(2px);
  height: 100%;
}
.card h3{ margin: 0; font-size: 18px; color: var(--text) }
.card p{ margin: 0; color: var(--muted) }

.page-content{ padding-top: 16px; }
.content-block{
  width: 100%;
  padding: 24px;
  border-radius: 10px;
  background: var(--bg-50); /* 50% transparent */
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(2px);
  position: relative;
  z-index: 2;
}

.content-block.opacity{
  background: var(--bg-92); /* ~80% opaque */
}
.content-block ul.bullet-list{ margin:8px 0 16px 1.25rem; padding:0 }

h2,
.section-title,
.content-block h2 {
  margin-top: 0;
  color: var(--accent );
}

h1, h2, h3, .brand-title, .section-title {
  font-family: "Libre Baskerville", Georgia, serif;
  letter-spacing: 0.01em;
  font-weight:700;
}

h1{
  font-weight:700;
  /*font-size:clamp(28px, 4vw, 44px);*/
  line-height:1.2;
  margin:16px 0 8px;
  color:#2f6474;
  /* filet d’ombre claire pour lisibilité sur le visuel de fond */
  text-shadow: 0 2px 14px var(--bg), 0 4px 22px var(--bg);
}


h3{
  margin-top: 0;
  color: var(--teal);
  font-weight: 700;
  position: relative;      /* nécessaire pour l’ombre */
  padding-bottom: 4px;     /* espace pour la barre */
  width: max-content;
  border-bottom: var(--teal) 4px solid;
}



b{
  font-weight: 700;
  color: var(--accent);
}

b.rich{
  font-weight: 900;
  color: var(--accent2);
}

p.bord{
  /*border-left: 4px solid var(--teal);*/
  padding: 12px;
  background-color: #b5b4b4a7;
  border-radius: 10px 10px 10px 10px;
  max-width:max-content;
  color:var(--teal);
  font-weight: 600;
}

p.bord b{
  color: var(--teal);
}


figcaption{
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
  font-style: italic;
  word-break: break-word;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  max-width: 100%;
  text-align: center;
  /*margin-left:24px;*/
}

.content-figure {
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
  text-align: center;
}

.content-figure img {
  margin-left: auto;
  margin-right: auto;
}
.content-figure figcaption a {
  text-decoration: underline;
  color: inherit;
  word-break: break-word;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  white-space: normal;
  display: inline-block;
  max-width: 100%;
}

/* Image alternative (V5) quand la souris est sur la zone droite */
body.bg-alt{
  background-image:
    linear-gradient(90deg, var(--bg) 0%, var(--bg-92) 18%, #F7F6F400 40%),
    url("../assets/images/usine avec fond V5.png");
}
/* Fallback simple: survol n’importe où (si le JS ne charge pas) */
@media (pointer: fine){
  body:hover{
    background-image:
      linear-gradient(90deg, var(--bg) 0%, var(--bg-92) 18%, #F7F6F400 40%),
      url("../assets/images/usine avec fond V5.png");
  }
}

.content-image{ display:block; max-width:100%; height:auto; border-radius:10px; box-shadow: var(--shadow-soft) }
.img--w70{ width:70%; max-width:70% }   /* utilitaire */
.img--w50{ width:50%; max-width:50% }   /* utilitaire */
.img--w30{ width:30%; max-width:30% }   /* utilitaire */

/* Masquer hero sur mobile pour les pages non-accueil */
@media (max-width: 768px) {
  .container {
    padding: 16px;
  }

  .hide-hero-mobile {
    display: none;
  }

  /* Images 100% sur mobile */
  .img--w70,
  .img--w50,
  .img--w30 {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Figure 100% sur mobile */
  .content-figure {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Images dans figure 100% sur mobile */
  figure img {
    width: 100% !important;
    max-width: 100% !important;
  }
}
/* Bouton remonter en haut */
.scroll-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background-color: var(--teal);
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  z-index: 999;
  transition: all 0.3s ease;
}

.scroll-to-top:hover {
  background-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.scroll-to-top:active {
  transform: translateY(-1px);
}

.scroll-to-top.visible {
  display: flex;
}

@media (max-width: 768px) {
  .scroll-to-top {
    width: 45px;
    height: 45px;
    bottom: 15px;
    right: 15px;
    font-size: 20px;
  }

  /* Hero fullwidth sur mobile */
  .container > .hero {
    width: 100vw;
    margin-left: -24px;
    margin-right: -24px;
    padding: 24px;
    margin-bottom: 40px;
  }

  .hero-content {
    max-width: 100%;
    padding: 8px 0 0;
  }

  .hero-art {
    display: none !important;
  }
}