/* Charte Croix-Rouge française : rouge institutionnel, blanc, gris anthracite.
   Mêmes jetons que les autres outils de la DT (dashboard, organigramme). */
:root {
  --rouge: #e3061a;
  --rouge-fonce: #b80515;
  --rouge-clair: #fdeaec;
  --texte: #1d1d1b;
  --gris: #5f6368;
  --fond: #f4f4f2;
  --carte: #ffffff;
  --bordure: #d9d9d6;
  --rayon: 12px;
  --ombre: 0 2px 12px rgba(29, 29, 27, 0.08);
  --police: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --largeur: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--police);
  color: var(--texte);
  background: var(--carte);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rouge); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }

.conteneur { width: min(100% - 2rem, var(--largeur)); margin-inline: auto; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.evitement { position: absolute; left: 1rem; top: -4rem; background: var(--texte); color: #fff; padding: 0.6rem 1rem; border-radius: 6px; z-index: 100; }
.evitement:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--rouge); outline-offset: 3px; }

.surtitre { color: var(--rouge); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; margin-bottom: 0.6rem; }
.surtitre--clair { color: #fff; opacity: 0.9; }

/* Boutons */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.7rem 1.3rem; border-radius: 999px; font-weight: 700; text-decoration: none;
  border: 2px solid transparent; transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}
.bouton:active { transform: translateY(1px); }
.bouton--grand { padding: 0.9rem 1.7rem; font-size: 1.05rem; }
.bouton--plein { background: var(--rouge); color: #fff; }
.bouton--plein:hover { background: var(--rouge-fonce); }
.bouton--contour { background: transparent; color: var(--texte); border-color: var(--texte); }
.bouton--contour:hover { background: var(--texte); color: #fff; }
.bouton--sombre { background: var(--texte); color: #fff; }
.bouton--sombre:hover { background: #000; }

/* En-tête */
.entete { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--bordure); }
.entete__barre { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.entete__logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--texte); }
.entete__logo img { width: 170px; height: auto; }
.entete__territoire { font-weight: 800; font-size: 1.1rem; padding-left: 0.75rem; border-left: 2px solid var(--bordure); }
.navigation { display: flex; align-items: center; gap: 1.5rem; }
.navigation a:not(.bouton) { color: var(--texte); text-decoration: none; font-weight: 600; }
.navigation a:not(.bouton):hover { color: var(--rouge); }
.entete__menu { display: none; background: none; border: 2px solid var(--bordure); border-radius: 8px; width: 44px; height: 44px; cursor: pointer; position: relative; }
.entete__burger, .entete__burger::before, .entete__burger::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--texte); position: absolute; left: 10px; transition: transform 0.2s, opacity 0.2s;
}
.entete__burger { top: 19px; }
.entete__burger::before { top: -6px; left: 0; }
.entete__burger::after { top: 6px; left: 0; }
.entete__menu[aria-expanded="true"] .entete__burger { background: transparent; }
.entete__menu[aria-expanded="true"] .entete__burger::before { transform: translateY(6px) rotate(45deg); }
.entete__menu[aria-expanded="true"] .entete__burger::after { transform: translateY(-6px) rotate(-45deg); }

/* Héros */
.heros { background: linear-gradient(180deg, #fff 0%, var(--fond) 100%); padding: clamp(3rem, 7vw, 6rem) 0; overflow: hidden; }
.heros__grille { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 3rem; align-items: center; }
.heros__accroche { font-size: 1.2rem; color: var(--gris); max-width: 36rem; }
.heros__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.5rem; }
.heros__visuel { display: flex; justify-content: center; }
.croix { width: min(280px, 60vw); aspect-ratio: 1; position: relative; filter: drop-shadow(0 20px 40px rgba(227, 6, 26, 0.25)); }
.croix::before, .croix::after, .croix span {
  content: ""; position: absolute; background: var(--rouge); border-radius: 10px;
}
.croix::before { inset: 0 33.33%; }
.croix::after { inset: 33.33% 0; }
.croix span { inset: 33.33%; }

/* Sections */
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section--gris { background: var(--fond); }
.section--rouge { background: var(--rouge); color: #fff; }
.section--rouge h2 { color: #fff; }
.section__intro { font-size: 1.1rem; color: var(--gris); max-width: 42rem; margin-bottom: 2rem; }

.cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.25rem; }
.carte { background: var(--carte); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 1.5rem; box-shadow: var(--ombre); }
.carte__icone { width: 52px; height: 52px; border-radius: 12px; background: var(--rouge-clair); color: var(--rouge); display: grid; place-items: center; margin-bottom: 1rem; }
.carte p { color: var(--gris); margin: 0; }

.agir { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; margin-top: 2rem; }
.agir__carte { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.35); border-radius: var(--rayon); padding: 1.6rem; color: #fff; text-decoration: none; display: flex; flex-direction: column; transition: background 0.15s, transform 0.15s; }
.agir__carte:hover { background: rgba(255, 255, 255, 0.18); transform: translateY(-2px); }
.agir__carte p { opacity: 0.92; flex: 1; }
.agir__lien { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.formation { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.liste-coches { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.liste-coches li { position: relative; padding-left: 2rem; margin-bottom: 0.7rem; }
.liste-coches li::before { content: ""; position: absolute; left: 0; top: 0.35em; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--rouge); mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='%23000'/%3E%3Cpath d='M7 12.5l3 3 7-7' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='%23000'/%3E%3Cpath d='M7 12.5l3 3 7-7' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.encadre { background: var(--texte); color: #fff; border-radius: var(--rayon); padding: 2rem; }
.encadre h3 { color: #fff; }
.encadre p { opacity: 0.85; }
.encadre .bouton--sombre { background: var(--rouge); }
.encadre .bouton--sombre:hover { background: var(--rouge-fonce); }

.contact { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.contact__coordonnees { font-style: normal; font-size: 1.1rem; }
.contact__coordonnees a { font-weight: 600; }
.contact__urgence { background: #fff; border-left: 4px solid var(--rouge); padding: 1rem 1.2rem; border-radius: 6px; margin-top: 1.5rem; }
.contact__urgence strong { display: block; margin-bottom: 0.2rem; }
.contact__carte { background: var(--carte); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 2rem; box-shadow: var(--ombre); display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.contact__note { color: var(--gris); margin: 0; font-size: 0.95rem; }

/* Pied de page */
.pied { background: var(--texte); color: #fff; padding: 3rem 0 1.5rem; }
.pied__grille { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
.pied__logo { background: #fff; padding: 0.5rem 0.8rem; border-radius: 8px; width: 170px; margin-bottom: 1rem; }
.pied p { opacity: 0.8; }
.pied__liens { display: flex; flex-direction: column; gap: 0.6rem; }
.pied__liens a { color: #fff; text-decoration: none; opacity: 0.9; }
.pied__liens a:hover { text-decoration: underline; }
.pied__bas { border-top: 1px solid rgba(255, 255, 255, 0.15); margin-top: 2rem; padding-top: 1.2rem; font-size: 0.9rem; }
.pied__bas p { margin: 0; opacity: 0.7; }

/* Page secondaire */
.page { padding: 3rem 0 4rem; max-width: 46rem; }
.page h2 { font-size: 1.4rem; margin-top: 2rem; }

/* Mobile */
@media (max-width: 860px) {
  .entete__menu { display: block; }
  .navigation { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--bordure); flex-direction: column; align-items: stretch; padding: 1rem; gap: 0.25rem; }
  .navigation[data-ouvert] { display: flex; }
  .navigation a:not(.bouton) { padding: 0.8rem 0.5rem; border-radius: 8px; }
  .navigation a:not(.bouton):hover { background: var(--fond); }
  .navigation .bouton { margin-top: 0.5rem; }
  .heros__grille, .formation, .contact, .pied__grille { grid-template-columns: 1fr; gap: 2rem; }
  .heros__visuel { order: -1; }
  .croix { width: 150px; }
}
@media (max-width: 480px) {
  .entete__logo img { width: 130px; }
  .entete__territoire { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
