/* Portail sp55.fr — charte UDSP 55, mise en page inspirée des sites d'unions départementales */
:root {
  --rouge: #e2191f; --rouge-vif: #f0353b; --rouge-sombre: #a8121a;
  --nuit: #1c2654; --nuit-2: #26397a;
  --encre: #17204a; --texte: #3a4150; --doux: #687080; --filet: #e2e5ec; --gris: #f4f5f8;
  --r: 18px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: #fff; color: var(--texte); font: 16.5px/1.6 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--nuit-2); }
h1, h2, h3 { color: var(--encre); margin: 0; letter-spacing: -.015em; }
.cadre { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.evitement { position: absolute; left: 12px; top: -50px; background: #fff; color: var(--encre); padding: 8px 12px; z-index: 60; }
.evitement:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--rouge); outline-offset: 2px; }

/* Petit surtitre « — TEXTE » rouge */
.sur { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; color: var(--rouge); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.sur::before { content: ""; width: 26px; height: 2px; background: currentColor; }
.sur-clair { color: #ff9ea1; }
.titre-duo { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 700; line-height: 1.1; }
.titre-duo span { color: var(--rouge); }

/* Boutons arrondis */
.pilule { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 20px; border-radius: 999px;
          font-weight: 700; font-size: .92rem; text-decoration: none; white-space: nowrap; border: 2px solid transparent; transition: background .15s, color .15s; }
.pilule-rouge { background: var(--rouge); color: #fff; }
.pilule-rouge:hover { background: var(--rouge-sombre); color: #fff; }
.pilule-blanche { background: #fff; color: var(--nuit); }
.pilule-blanche:hover { background: transparent; border-color: #fff; color: #fff; }
.pilule-bleue { background: var(--nuit-2); color: #fff; }
.pilule-bleue:hover { background: var(--nuit); color: #fff; }

/* ── Menu ────────────────────────────────────────────────────────── */
.menu { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--filet); }
.menu-int { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 74px; }
.menu-marque { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--encre); min-width: 0; }
.menu-marque img { height: 46px; width: auto; padding: 5px 7px; border-radius: 10px; background: var(--nuit-2); }
.menu-marque b { display: block; font-size: 1.05rem; }
.menu-marque small { display: block; color: var(--doux); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-liens { display: flex; align-items: center; gap: 6px; }
.menu-liens a:not(.pilule) { color: var(--encre); text-decoration: none; font-weight: 600; font-size: .94rem; padding: 8px 12px; }
.menu-liens a:not(.pilule):hover { color: var(--rouge); }
.menu-liens .pilule { margin-left: 8px; }

/* ── Bannière ────────────────────────────────────────────────────── */
.heros { position: relative; overflow: hidden; color: #fff; padding: 76px 0 150px;
  background: linear-gradient(115deg, var(--nuit) 0%, var(--nuit-2) 55%, #2f4a98 100%); }
.heros-int { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.heros-texte { flex: 1 1 560px; max-width: 640px; }
.heros h1 { color: #fff; font-size: clamp(2.5rem, 6.4vw, 4.6rem); line-height: 1.02; font-weight: 800; letter-spacing: -.03em; margin-bottom: 18px; }
.heros-intro { margin: 0 0 26px; max-width: 560px; color: rgba(255, 255, 255, .82); font-size: 1.06rem; }
.recherche { position: relative; max-width: 520px; }
.recherche input { width: 100%; height: 56px; padding: 0 18px 0 50px; border: 0; border-radius: 999px; background: #fff; color: var(--encre); font: inherit; font-size: 1.02rem; -webkit-appearance: none; appearance: none; }
.recherche input:focus { outline: 3px solid var(--rouge); outline-offset: 2px; }
.loupe { position: absolute; left: 18px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); fill: #7a808a; pointer-events: none; }
.chiffres { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; padding: 0; }
.chiffres div { min-width: 150px; padding: 12px 18px; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); }
.chiffres dt { color: rgba(255, 255, 255, .65); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.chiffres dd { margin: 2px 0 0; color: #fff; font-size: 1.35rem; font-weight: 800; }
/* Logo UDSP en grand médaillon, à la manière d'un écusson */
.ecusson { flex: 0 0 auto; width: 330px; height: 330px; border-radius: 50%; display: grid; place-items: center;
           background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04) 70%);
           border: 2px solid rgba(255, 255, 255, .18); box-shadow: 0 0 0 14px rgba(255, 255, 255, .04); }
.ecusson img { width: 64%; height: auto; display: block; }

/* ── Trois tuiles qui chevauchent la bannière ────────────────────── */
.trio { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: -96px; }
.tuile { padding: 26px 26px 24px; border-radius: var(--r); display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
         box-shadow: 0 14px 34px rgba(23, 32, 74, .16); }
.tuile h2 { font-size: 1.25rem; font-weight: 800; }
.tuile p { margin: 0 0 6px; font-size: .95rem; flex: 1; }
.tuile-bleue { background: var(--nuit); color: rgba(255, 255, 255, .82); }
.tuile-bleue h2, .tuile-rouge h2 { color: #fff; }
.tuile-blanche { background: #fff; border: 1px solid var(--filet); }
.tuile-rouge { background: var(--rouge); color: rgba(255, 255, 255, .9); }
.tuile-rouge .pilule-blanche { color: var(--rouge); }

/* ── Annuaire ────────────────────────────────────────────────────── */
.section { padding-top: 74px; }
.tete-section { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px; margin-bottom: 26px; }
.compte { margin: 0; color: var(--doux); font-weight: 600; }
.grille { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.grille li[hidden] { display: none; }
.carte { display: flex; align-items: center; gap: 14px; height: 100%; padding: 18px 18px 18px 22px; border-radius: 14px; background: #fff; text-decoration: none;
         border: 1px solid var(--filet); position: relative; overflow: hidden; transition: border-color .15s, background .15s; }
.carte::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--rouge); }
.carte:hover { border-color: var(--nuit-2); background: #f8f9fc; }
.carte-texte { flex: 1; min-width: 0; }
.nom { display: block; color: var(--encre); font-weight: 700; font-size: 1.06rem; }
.adresse { display: block; color: var(--doux); font-size: .88rem; overflow-wrap: anywhere; }
.nouveau { display: inline-block; vertical-align: 2px; margin-left: 6px; padding: 2px 9px; border-radius: 999px; background: var(--rouge); color: #fff;
           font-style: normal; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.carte-fleche { flex: 0 0 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--gris); color: var(--nuit-2); font-weight: 700; transition: background .15s, color .15s; }
.carte:hover .carte-fleche { background: var(--rouge); color: #fff; }
.aucun { color: var(--doux); }
.aucun[hidden] { display: none; }

/* ── Ligne ondulée « parcours » ──────────────────────────────────── */
.parcours { margin-top: 70px; }
.parcours-int { position: relative; height: 60px; }
.parcours svg { width: 100%; height: 60px; display: block; overflow: visible; }
.parcours path { fill: none; stroke: var(--nuit-2); stroke-width: 3; stroke-dasharray: 10 8; vector-effect: non-scaling-stroke; }
/* Points posés là où la courbe repasse par son milieu (x = 300, 600, 900 sur 1200) */
.pt { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--rouge); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--rouge); }
.pt1 { left: 25%; } .pt2 { left: 50%; } .pt3 { left: 75%; }

/* ── Encadré bureaux d'amicale ───────────────────────────────────── */
#bureaux { padding-top: 40px; }
.appel { display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; padding: 44px 48px; border-radius: 22px; color: rgba(255, 255, 255, .82);
         background: radial-gradient(560px 300px at 100% 0%, rgba(226, 25, 31, .42), transparent 62%), linear-gradient(135deg, var(--nuit-2), var(--nuit)); }
.appel-texte { flex: 1 1 460px; }
.appel h2 { color: #fff; font-size: clamp(1.6rem, 3.2vw, 2.2rem); line-height: 1.15; margin-bottom: 12px; }
.appel-texte p:last-child { margin: 0; max-width: 640px; }
.appel-texte strong { color: #fff; }
.appel-action { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.appel-mail { margin: 0; color: rgba(255, 255, 255, .65); font-size: .92rem; }

/* ── Bandeau de devise + partenaires ─────────────────────────────── */
.devise { margin-top: 80px; background: var(--nuit); color: #fff; border-top: 6px solid var(--rouge); }
.devise-int { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 22px 40px; padding-top: 46px; padding-bottom: 46px; }
.devise-logo { height: 120px; width: auto; }
.devise-texte { margin: 0; font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 300; line-height: 1.15; }
.devise-texte span { font-weight: 800; }
.partenaires { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 14px; }
.partenaire { display: flex; align-items: center; gap: 14px; padding: 10px 20px 10px 14px; border-radius: 16px; text-decoration: none;
              background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .88); max-width: 100%; transition: background .15s; }
.partenaire:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.partenaire-logo { flex: 0 0 auto; display: grid; place-items: center; height: 52px; }
.partenaire-logo img { height: 52px; width: auto; max-width: 150px; object-fit: contain; display: block; }
.partenaire-texte { font-size: .9rem; font-weight: 600; line-height: 1.35; max-width: 330px; }

/* ── Pied de page ────────────────────────────────────────────────── */
.pied { background: #141c40; color: rgba(255, 255, 255, .72); font-size: .92rem; }
.pied a { color: rgba(255, 255, 255, .88); text-decoration: none; }
.pied a:hover { color: #fff; text-decoration: underline; }
.pied-colonnes { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; padding-top: 44px; padding-bottom: 34px; }
.pied-bloc h2 { color: #fff; font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px; }
.pied-bloc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pied-bloc p { margin: 0; }
.pied-marque img { height: 64px; width: auto; margin-bottom: 12px; }
.pied-bas { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; padding-top: 18px; padding-bottom: 22px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .85rem; }
.pied-plateforme { display: inline-flex; align-items: center; gap: 8px; }
.pied-plateforme img { height: 20px; width: auto; }

/* ── Écrans moyens et petits ─────────────────────────────────────── */
@media (max-width: 980px) {
  .menu-liens a:not(.pilule) { display: none; }
  .ecusson { width: 230px; height: 230px; }
  .trio { grid-template-columns: 1fr; margin-top: -70px; }
  .pied-colonnes { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .cadre { padding: 0 16px; }
  .menu-marque small { display: none; }
  .menu-liens .pilule { padding: 0 14px; font-size: .85rem; }
  .heros { padding: 40px 0 100px; }
  .heros-int { flex-direction: column-reverse; align-items: flex-start; gap: 22px; }
  .heros-texte { flex: none; width: 100%; }
  .ecusson { width: 120px; height: 120px; box-shadow: none; }
  .chiffres div { min-width: 0; flex: 1 1 100px; padding: 10px 12px; }
  .section { padding-top: 54px; }
  .appel { padding: 30px 22px; }
  .devise-int { grid-template-columns: 1fr; }
  .devise-logo { height: 80px; }
  .partenaire { width: 100%; }
  .partenaire-logo, .partenaire-logo img { height: 44px; }
  .pied-colonnes { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .carte, .pilule, .carte-fleche { transition: none; } }
