/* Charte « Rendez la voile aux seniors marseillais en 2027 » — voir docs/charte.md
   Polices : Bricolage Grotesque (titres), Atkinson Hyperlegible Next (texte, conçue pour la lisibilité).
   Thèmes : clair (défaut), sombre, ou système — html[data-theme] posé par /static/theme.js. */
@font-face { font-family: "Bricolage"; src: url("/static/fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap }
@font-face { font-family: "Bricolage"; src: url("/static/fonts/bricolage-grotesque-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap }
@font-face { font-family: "Atkinson"; src: url("/static/fonts/atkinson-hyperlegible-next-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap }
@font-face { font-family: "Atkinson"; src: url("/static/fonts/atkinson-hyperlegible-next-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap }
@font-face { font-family: "Atkinson"; src: url("/static/fonts/atkinson-hyperlegible-next-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap }

:root {
  --klein: #002FA7; --klein-fonce: #001F70; --jaune: #FFD100; --echo: #E5308A; --chaux: #F7F5EF;
  --fond: #F7F5EF; --carte: #FFFFFF; --encre: #10163A; --gris: #4A4F68; --titre: #002FA7; --lien: #002FA7;
  --bord: #8A8FA8; --filet: #D5D7E2; --ombre: rgba(16,22,58,.07); --ok: #FFF6CC; --erreur: #FDE7E7; --erreur-bord: #B00020;
  --titres: "Bricolage", system-ui, sans-serif; --texte: "Atkinson", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color-scheme: light;
}
html[data-theme="dark"] {
  --fond: #0A1030; --carte: #141C45; --encre: #EEF0F8; --gris: #B9BFD8; --titre: #FFFFFF; --lien: #A9BCFF;
  --bord: #5D6696; --filet: #2C3566; --ombre: rgba(0,0,0,.35); --ok: #3A3210; --erreur: #4A1420; --erreur-bord: #FF6B81;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    --fond: #0A1030; --carte: #141C45; --encre: #EEF0F8; --gris: #B9BFD8; --titre: #FFFFFF; --lien: #A9BCFF;
    --bord: #5D6696; --filet: #2C3566; --ombre: rgba(0,0,0,.35); --ok: #3A3210; --erreur: #4A1420; --erreur-bord: #FF6B81;
    color-scheme: dark;
  }
}

* { box-sizing: border-box }
html { font-size: 112.5% }
body { margin: 0; background: var(--fond); color: var(--encre); font-family: var(--texte); line-height: 1.6; transition: background .2s, color .2s }
a { color: var(--lien); text-underline-offset: 3px }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 4px solid var(--jaune); outline-offset: 2px }
.evitement { position: absolute; left: -9999px } .evitement:focus { left: 1rem; top: 1rem; background: var(--jaune); color: var(--klein); padding: .5rem 1rem; z-index: 9 }

.bandeau { background: var(--klein); color: #fff; position: relative; padding: 2rem 1.2rem clamp(5rem, 11vw, 9rem); overflow: hidden }
.bandeau-in { max-width: 1040px; margin: auto; position: relative }
.marque { display: flex; gap: 1.1rem; align-items: center; color: #fff; text-decoration: none }
.marque .titre { font-family: var(--titres); font-size: clamp(2.1rem, 6vw, 4rem); font-weight: 800; line-height: 1; letter-spacing: -.02em; text-wrap: balance }
.badge { overflow: hidden; flex: none; width: clamp(68px, 11vw, 116px); aspect-ratio: 1; border-radius: 50%; background: var(--chaux); display: grid; place-items: center; box-shadow: 0 0 0 5px var(--jaune) }
.echo { width: 78% }
.sous-titre { margin: 1rem 0 0; font-size: 1.05rem; display: inline-block; border-bottom: 5px solid var(--jaune); padding-bottom: .25rem }
.sous-titre strong { color: var(--jaune); font-family: var(--titres); font-size: 1.2rem }
.skyline { position: absolute; left: 0; bottom: -1px; width: 100%; height: clamp(70px, 11vw, 160px) }
.skyline path { fill: var(--fond); transition: fill .2s }

.barre { max-width: 1040px; margin: 0 auto; padding: .4rem 1rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between }
.menu { display: flex; flex-wrap: wrap; gap: .3rem .2rem }
.menu a { font-size: .92rem; padding: .4rem .55rem; border-radius: 999px; text-decoration: none; font-weight: 700 }
.menu a:hover { background: var(--carte) }
.menu a[aria-current="page"] { background: var(--klein); color: #fff }
.theme { position: absolute; top: .8rem; right: .8rem; z-index: 2; display: inline-flex; border: 2px solid rgba(255,255,255,.35); border-radius: 999px; padding: 2px; background: rgba(0,20,80,.35) }
.theme button { font: 700 .8rem var(--texte); color: #fff; background: none; border: 0; border-radius: 999px; padding: .3rem .6rem; cursor: pointer }
.theme button[aria-pressed="true"] { background: var(--jaune); color: var(--klein) }

main { max-width: 1040px; margin: auto; padding: 1rem 1.2rem 3rem }
h1, h2, h3 { font-family: var(--titres); color: var(--titre) }
h1 { font-size: 2.3rem; letter-spacing: -.015em; line-height: 1.15; margin: 1rem 0 .8rem }
h2 { font-size: 1.5rem; margin: 1.6rem 0 .6rem }
h3 { font-size: 1.2rem; margin: 0 0 .4rem }
.carte h2:first-child { margin-top: 0 }
.surtitre { text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; color: var(--gris); margin: 0 }
.intro { font-size: 1.25rem; max-width: 760px }
.intro p:first-child { font-weight: 700; font-size: 1.35rem; border-left: 8px solid var(--echo); padding-left: 1rem }
.intro-p { font-size: 1.15rem; max-width: 760px }
.petit { font-size: .9rem; color: var(--gris) }

.carte { background: var(--carte); border-radius: 16px; padding: 1.4rem 1.5rem; margin: 1rem 0; box-shadow: 0 1px 0 var(--ombre), 0 6px 20px var(--ombre) }
.cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem }
.cartes .carte { margin: 0 }
.cartes.trois .carte { border-top: 6px solid var(--echo) }
.carte.lien { text-decoration: none; color: var(--encre); border-top: 6px solid var(--jaune); transition: transform .15s }
.carte.lien:hover { transform: translateY(-3px) }
.appel { background: var(--klein); color: #fff; border-radius: 20px; padding: 1.6rem; margin: 1.4rem 0; position: relative; overflow: hidden }
.appel > * { position: relative; z-index: 1 }
.appel::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 180px; height: 180px; border-radius: 50%; border: 22px solid rgba(255,209,0,.18) }
.appel p:first-child { font-family: var(--titres); font-size: 1.6rem; font-weight: 800; margin-top: 0 }
.appel a:not(.bouton) { color: var(--jaune) } .appel .petit { color: #E6EBFA }

.bouton { display: inline-block; background: var(--jaune); color: var(--klein); font: 800 1.2rem var(--titres); padding: .9rem 1.6rem; border-radius: 999px; text-decoration: none; border: 0; cursor: pointer; box-shadow: 0 3px 0 #C9A500 }
.bouton:hover { background: #FFE04D } .bouton.secondaire { background: var(--klein); color: #fff; box-shadow: none }
form .bouton { width: 100%; margin-top: 1.4rem }

.chiffres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.2rem 0 }
.chiffres div { background: var(--carte); border-radius: 16px; padding: 1rem; text-align: center; border-bottom: 6px solid var(--jaune) }
.chiffres strong { display: block; font-family: var(--titres); font-size: 2.8rem; color: var(--titre); line-height: 1.1 }
.mur-noms { font-family: var(--titres); font-weight: 800; font-size: clamp(1.05rem, 2.2vw, 1.45rem); line-height: 1.08; letter-spacing: -.01em;
  text-align: justify; hyphens: none; word-spacing: .05em; color: var(--titre); background: var(--carte); border-radius: 16px; padding: 1.4rem 1.6rem;
  border-top: 8px solid var(--echo); margin: 1.2rem 0 }
.demandes li { margin: .45rem 0 } .demandes li::marker { color: var(--echo); font-weight: 800 }
.lettre { border-left: 8px solid var(--klein) } .signature { font-style: italic; margin-top: 1.6rem }
.sommaire { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; list-style: none }
.sommaire a { display: inline-block; padding: .35rem .8rem; border: 2px solid var(--filet); border-radius: 999px; text-decoration: none; font-weight: 700 }
.repere { display: grid; grid-template-columns: 11rem 1fr; gap: .2rem 1rem; padding: .7rem 0; border-top: 1px solid var(--filet) }
.repere:first-of-type { border-top: 0 } .repere strong { font-family: var(--titres); color: var(--titre) }

label { display: block; font-weight: 700; margin: 1rem 0 .35rem }
input[type=text], input[type=email], input[type=tel], input[type=file], input:not([type]) { width: 100%; font: 1.1rem var(--texte); padding: .75rem .9rem; border: 2px solid var(--bord); border-radius: 10px; background: var(--carte); color: var(--encre) }
fieldset { border: 0; padding: 0; margin: 0 } legend { font-weight: 700; margin-bottom: .3rem }
.radio { font-weight: 400; display: flex; gap: .6rem; align-items: center; margin: .4rem 0 } .radio input { width: 24px; height: 24px }
.case { display: flex; gap: .8rem; align-items: flex-start; margin-top: 1.1rem } .case input { width: 26px; height: 26px; flex: none; margin-top: .15rem } .case label { font-weight: 400; margin: 0 }
.aide { margin: 0 0 .3rem; font-size: .9rem; color: var(--gris) }
.deux { display: grid; grid-template-columns: 1fr 2fr; gap: 0 1rem }
.hp { position: absolute; left: -9999px }
.erreur { background: var(--erreur); border-left: 6px solid var(--erreur-bord); padding: .8rem 1.2rem; border-radius: 10px }
.ok { background: var(--ok); border-left: 6px solid var(--jaune); padding: .8rem 1.2rem; border-radius: 10px }
.encart { border: 3px dashed var(--lien) }
address { font-style: normal; font-weight: 700 }
dl.rgpd dt { font-family: var(--titres); font-weight: 800; color: var(--titre); margin-top: 1rem } dl.rgpd dd { margin: .2rem 0 0 }

.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem }
.galerie figure { margin: 0; background: var(--carte); border-radius: 14px; overflow: hidden }
.galerie img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block }
.galerie figcaption { padding: .6rem .8rem; font-size: .95rem }

.pied { background: var(--klein-fonce); color: #fff; padding: 2rem max(1.2rem, calc((100% - 1040px) / 2)); display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; border-top: 8px solid var(--jaune) }
.pied a { color: var(--jaune) }

.admin main { max-width: 1400px } .chiffre-admin { font-size: 1.3rem; font-weight: 800; color: var(--titre) }
.defile { overflow-x: auto } table { border-collapse: collapse; width: 100%; font-size: .9rem; background: var(--carte); color: var(--encre) }
th, td { border: 1px solid var(--filet); padding: .45rem .6rem; text-align: left; vertical-align: top } th { background: var(--filet) }
.mini { font-size: .8rem; padding: .3rem .6rem; border: 0; border-radius: 6px; background: var(--klein); color: #fff; cursor: pointer } .mini.rouge { background: #B00020 }
.inline { display: inline } details summary { cursor: pointer } .mini-galerie { margin-top: 1rem }

@media (max-width: 640px) {
  .chiffres { gap: .5rem } .chiffres div { padding: .7rem .3rem; font-size: .8rem } .chiffres strong { font-size: 1.8rem }
  .deux { grid-template-columns: 1fr } .bandeau { padding-top: .8rem }
  .theme { position: relative; top: 0; right: 0; display: flex; width: max-content; margin: 0 0 .9rem auto } .repere { grid-template-columns: 1fr }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important } }
