/* Ski-club Champex-Ferret — site public */
@font-face { font-family: "Inter"; src: url("../fonts/InterVariable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --nuit: #0b1b4d;        /* bleu des titres */
  --nuit-2: #13296b;
  --rouge: #e2001a;       /* rouge du trait de l'ancien site */
  --rouge-2: #b80015;
  --encre: #1d2433;
  --gris: #5b6577;
  --glace: #f1f4f8;
  --ciel: #dde5f0;
  --trait: #d9dfe8;
  --blanc: #fff;
  --rayon: 14px;
  --ombre: 0 1px 2px rgba(11, 27, 77, .06), 0 8px 24px rgba(11, 27, 77, .08);
  --large: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 17px; line-height: 1.65; color: var(--encre); background: var(--blanc); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--nuit-2); text-underline-offset: 3px; }
a:hover { color: var(--rouge); }
:focus-visible { outline: 3px solid #ffb400; outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { color: var(--nuit); line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; text-wrap: balance; }
.evitement { position: absolute; left: -9999px; top: 0; background: var(--nuit); color: #fff; padding: 10px 16px; z-index: 100; }
.evitement:focus { left: 8px; top: 8px; }

.large { width: min(var(--large), 100% - 40px); margin-inline: auto; }
.large.etroit { width: min(780px, 100% - 40px); }
.centre { text-align: center; }

/* ---------- En-tête ---------- */
.entete { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--trait); }
.entete-dedans { width: min(var(--large), 100% - 40px); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.logo img { height: 52px; width: auto; }
.menu > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.menu li { position: relative; }
.menu a, .menu .sous-titre { display: block; padding: 10px 14px; border-radius: 8px; font: inherit; font-size: 16px; font-weight: 550; color: var(--nuit); text-decoration: none; background: none; border: 0; cursor: pointer; white-space: nowrap; }
.menu a:hover, .menu .sous-titre:hover, .menu li:focus-within > .sous-titre { background: var(--glace); color: var(--nuit); }
.menu > ul > li.actif > a, .menu > ul > li.actif > .sous-titre { background: var(--nuit); color: #fff; }
.menu .sous-titre::after { content: ""; display: inline-block; margin-left: 7px; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.menu .sous-bascule { display: none; }
.menu .sous { list-style: none; margin: 0; padding: 8px; position: absolute; left: 0; top: calc(100% + 6px); min-width: 230px; background: #fff; border: 1px solid var(--trait); border-radius: 12px; box-shadow: var(--ombre); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility .15s; }
.menu .sous::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.menu li:hover > .sous, .menu li:focus-within > .sous, .menu li.ouvert > .sous { opacity: 1; visibility: visible; transform: none; }
.menu .sous li.actif a { color: var(--rouge); }
.burger { display: none; width: 46px; height: 46px; border: 1px solid var(--trait); border-radius: 10px; background: #fff; cursor: pointer; padding: 0; }
.burger span { display: block; width: 20px; height: 2px; background: var(--nuit); margin: 4px auto; transition: transform .2s, opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1020px) {
  .burger { display: block; }
  .menu { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--trait); box-shadow: var(--ombre); max-height: calc(100vh - 76px); overflow: auto; padding: 10px 20px 20px; }
  .menu.ouvert { display: block; }
  .menu > ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .menu a, .menu .sous-titre { width: 100%; text-align: left; padding: 13px 12px; font-size: 17px; }
  .menu .sous { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; border-left: 3px solid var(--ciel); border-radius: 0; margin: 0 0 6px 14px; padding: 0 0 0 6px; min-width: 0; }
  .menu .sous-titre::after { display: none; }
  .menu .sous-titre { cursor: default; color: var(--gris); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; padding-bottom: 4px; }
  .menu .sous-titre:hover { background: none; color: var(--gris); }
  .menu > ul > li.actif > .sous-titre { background: none; color: var(--rouge); }
}

/* ---------- Accueil : grande photo ---------- */
.hero { position: relative; min-height: min(72vh, 640px); display: grid; place-items: center; background: var(--nuit) center / cover no-repeat; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 27, 77, .15), rgba(11, 27, 77, .45)); }
.hero-titre { position: relative; margin: 0; padding: 26px 10px; color: #fff; font-size: clamp(44px, 9vw, 104px); font-weight: 900; font-style: italic; line-height: .95; letter-spacing: -.02em; text-transform: uppercase; text-align: center; transform: rotate(-8deg); text-shadow: 0 4px 0 rgba(11, 27, 77, .55), 0 14px 40px rgba(0, 0, 0, .35); }
.hero-titre span { display: block; }
.hero-titre::before, .hero-titre::after { content: ""; display: block; height: 5px; width: 78%; margin: 0 auto; background: linear-gradient(90deg, #fff 0 62%, #9fc0ff 62%); border-radius: 3px; }
.hero-titre::before { margin-bottom: 18px; }
.hero-titre::after { margin-top: 20px; }

/* ---------- Blocs ---------- */
.bloc { padding: clamp(48px, 7vw, 88px) 0; }
.bloc.gris { background: var(--glace); }
.bloc.bleu { background: var(--ciel); }
.bloc > .large + .large { margin-top: 48px; }
.titre-bloc { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; text-align: center; margin-bottom: 40px; }
.titre-bloc::after { content: ""; display: block; width: 110px; height: 5px; margin: 20px auto 0; background: var(--rouge); border-radius: 3px; }
.titre-bloc.discret { font-size: 15px; text-transform: uppercase; letter-spacing: .14em; color: var(--gris); font-weight: 650; }
.titre-bloc.discret::after { display: none; }
.bienvenue .titre-bloc { margin-bottom: 24px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 34px 0 0; }
.vide { text-align: center; color: var(--gris); }
.chapeau { font-size: 19px; color: var(--gris); max-width: 760px; margin: 0 0 30px; }
.retour { margin-top: 36px; }
.retour a { font-weight: 600; text-decoration: none; }

.bouton, .prose a.bouton { display: inline-block; padding: 13px 24px; border-radius: 999px; background: var(--rouge); color: #fff; font: inherit; font-weight: 650; font-size: 16px; text-decoration: none; border: 2px solid var(--rouge); cursor: pointer; transition: background .15s, transform .15s, border-color .15s; }
.bouton:hover, .prose a.bouton:hover { background: var(--rouge-2); border-color: var(--rouge-2); color: #fff; transform: translateY(-1px); }
.bouton-clair, .prose a.bouton-clair { background: transparent; color: var(--nuit); border-color: var(--nuit); }
.bouton-clair:hover, .prose a.bouton-clair:hover { background: var(--nuit); border-color: var(--nuit); color: #fff; }

/* ---------- Bandeau des pages ---------- */
.bandeau { background: linear-gradient(135deg, var(--nuit), var(--nuit-2)); color: #fff; padding: clamp(34px, 5vw, 58px) 0; position: relative; overflow: hidden; }
.bandeau::after { content: ""; position: absolute; right: -60px; bottom: -110px; width: 460px; height: 220px; background: rgba(255, 255, 255, .06); transform: rotate(-8deg); border-radius: 30px; }
.bandeau h1 { color: #fff; margin: 0; font-size: clamp(30px, 4.6vw, 48px); font-weight: 850; }
.bandeau h1::after { content: ""; display: block; width: 76px; height: 5px; margin-top: 16px; background: var(--rouge); border-radius: 3px; }
.fil { margin: 0 0 10px; font-size: 14px; color: #b9c6e6; }
.fil a { color: #dbe4f7; text-decoration: none; }
.fil a:hover { color: #fff; text-decoration: underline; }

/* ---------- Texte des pages ---------- */
.deux-colonnes { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.illustration { margin: 0; position: sticky; top: 100px; }
.illustration img { width: 100%; border-radius: var(--rayon); box-shadow: var(--ombre); }
.illustration.affiche img { border: 1px solid var(--trait); }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: clamp(22px, 2.6vw, 28px); margin-top: 1.6em; }
.prose h3 { font-size: 20px; margin-top: 1.5em; }
.prose h4 { font-size: 17px; margin-top: 1.4em; text-transform: uppercase; letter-spacing: .06em; color: var(--rouge); }
.prose p { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1.1em; }
.prose li { margin: .3em 0; }
.prose ul > li::marker { color: var(--rouge); }
.prose img { border-radius: 10px; margin: 1.4em 0; border: 1px solid var(--trait); }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--rouge); color: var(--gris); }
.prose table { border-collapse: collapse; width: 100%; margin: 1.4em 0; font-size: 16px; }
.prose th, .prose td { border: 1px solid var(--trait); padding: 8px 12px; text-align: left; }
.prose th { background: var(--glace); }
.prose .date { color: var(--gris); font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.prose.centre { text-align: center; font-size: 19px; color: var(--gris); }
@media (max-width: 820px) {
  .deux-colonnes { grid-template-columns: 1fr; }
  .illustration { position: static; }
}

/* ---------- News ---------- */
.grille-news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.carte-news { position: relative; background: #fff; border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.carte-news:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(11, 27, 77, .08), 0 18px 40px rgba(11, 27, 77, .14); }
.carte-news-image { display: block; aspect-ratio: 4 / 3; background: var(--ciel); overflow: hidden; }
.carte-news-image img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .4s; }
.carte-news:hover .carte-news-image img { transform: scale(1.04); }
.sans-image { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--ciel), #c4d2e6); }
.carte-news-texte { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.carte-news time { font-size: 13px; font-weight: 650; color: var(--rouge); text-transform: uppercase; letter-spacing: .08em; }
.carte-news h3 { font-size: 21px; margin: 8px 0 8px; }
.carte-news h3 a { color: inherit; text-decoration: none; }
.carte-news h3 a::after { content: ""; position: absolute; inset: 0; }
.carte-news p { margin: 0 0 14px; color: var(--gris); font-size: 16px; }
.carte-news .lire { margin-top: auto; font-weight: 650; font-size: 15px; color: var(--nuit-2); }
.carte-news .lire::after { content: " →"; }
@media (max-width: 960px) { .grille-news { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grille-news { grid-template-columns: 1fr; } }

/* ---------- Galeries et albums ---------- */
.galerie { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.galerie a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 10px; background: var(--ciel); }
.galerie img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.galerie a:hover img { transform: scale(1.06); }
.bloc.bleu .galerie { grid-template-columns: repeat(4, 1fr); gap: 16px; }
.bloc.bleu .galerie a { aspect-ratio: 1; border-radius: var(--rayon); box-shadow: var(--ombre); }
@media (max-width: 820px) { .bloc.bleu .galerie { grid-template-columns: repeat(2, 1fr); } .galerie { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; } }

.grille-albums { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; }
.grille-albums a { display: block; position: relative; aspect-ratio: 4 / 3; border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); background: var(--nuit); color: #fff; text-decoration: none; }
.grille-albums img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.grille-albums a:hover img { transform: scale(1.05); }
.album-titre { position: absolute; inset: auto 0 0 0; padding: 56px 20px 18px; background: linear-gradient(180deg, transparent, rgba(7, 17, 51, .88)); display: flex; flex-direction: column; gap: 2px; }
.album-titre strong { font-size: 20px; line-height: 1.25; }
.album-titre em { font-style: normal; font-size: 14px; color: #c9d5f0; }

/* Visionneuse */
.visionneuse { position: fixed; inset: 0; z-index: 200; background: rgba(5, 10, 28, .94); display: none; align-items: center; justify-content: center; }
.visionneuse.ouverte { display: flex; }
.visionneuse img { max-width: 94vw; max-height: 88vh; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.visionneuse button { position: absolute; background: rgba(255, 255, 255, .12); color: #fff; border: 0; width: 52px; height: 52px; border-radius: 50%; font-size: 26px; line-height: 1; cursor: pointer; }
.visionneuse button:hover { background: rgba(255, 255, 255, .26); }
.visionneuse .v-fermer { top: 16px; right: 16px; }
.visionneuse .v-prec { left: 16px; top: 50%; transform: translateY(-50%); }
.visionneuse .v-suiv { right: 16px; top: 50%; transform: translateY(-50%); }
.visionneuse .v-compte { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #c9d5f0; font-size: 14px; }
.visionneuse.seule .v-prec, .visionneuse.seule .v-suiv, .visionneuse.seule .v-compte { display: none; }

/* ---------- Cartes (comité, liens) ---------- */
.cartes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.carte { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 22px 24px; background: #fff; border: 1px solid var(--trait); border-left: 5px solid var(--nuit); border-radius: 12px; text-decoration: none; color: var(--encre); transition: transform .15s, box-shadow .15s, border-color .15s; }
a.carte:hover { transform: translateY(-3px); box-shadow: var(--ombre); border-left-color: var(--rouge); color: var(--encre); }
.carte strong { font-size: 19px; color: var(--nuit); line-height: 1.3; }
.carte span { color: var(--gris); font-size: 15.5px; }
.carte em { font-style: normal; font-size: 14px; color: var(--nuit-2); margin-top: auto; padding-top: 8px; word-break: break-word; }
.cartes.avec-image .carte { border-left-width: 1px; align-items: center; text-align: center; }
.cartes.avec-image img { max-height: 110px; width: auto; object-fit: contain; margin-bottom: 10px; }

.athletes { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.athletes li { background: var(--glace); border-radius: 999px; padding: 12px 24px; }
.athletes a { font-weight: 600; margin-left: 6px; }

.partenaires { padding: 48px 0; border-top: 1px solid var(--trait); }
.partenaires .titre-bloc { margin-bottom: 26px; }
.logos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 28px 52px; justify-content: center; align-items: center; }
.logos img { max-height: 70px; max-width: 190px; width: auto; object-fit: contain; filter: saturate(.9); transition: transform .2s; }
.logos a:hover img { transform: scale(1.06); }

/* ---------- Formulaires ---------- */
.formulaire { margin-top: 8px; padding: clamp(22px, 4vw, 38px); background: var(--glace); border-radius: var(--rayon); scroll-margin-top: 100px; }
.prose + .formulaire, .prose + .form-ok { margin-top: 28px; }
.colonne-texte:empty { display: none; }
.formulaire h2 { font-size: 24px; margin-bottom: 22px; }
.form-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.form-champ.large { grid-column: 1 / -1; }
.form-champ label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; color: var(--nuit); }
.form-champ label span { color: var(--rouge); }
.form-champ input, .form-champ select, .form-champ textarea { width: 100%; padding: 12px 14px; font: inherit; font-size: 16px; color: var(--encre); background: #fff; border: 1.5px solid #c5cedb; border-radius: 10px; }
.form-champ input:focus, .form-champ select:focus, .form-champ textarea:focus { outline: none; border-color: var(--nuit-2); box-shadow: 0 0 0 3px rgba(19, 41, 107, .15); }
.form-champ.en-erreur input, .form-champ.en-erreur select, .form-champ.en-erreur textarea { border-color: var(--rouge); }
.form-champ small { color: var(--rouge-2); font-size: 14px; }
.form-miel { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-envoi { margin: 24px 0 0; }
.form-erreur { background: #fde8ea; color: var(--rouge-2); border-radius: 10px; padding: 12px 16px; margin: 0 0 18px; font-weight: 600; }
.form-ok { background: #e4f5ea; color: #14532d; border-radius: var(--rayon); padding: 22px 26px; font-size: 18px; scroll-margin-top: 100px; }
@media (max-width: 620px) { .form-grille { grid-template-columns: 1fr; } }

/* ---------- Pied de page ---------- */
.pied { background: var(--nuit); color: #c9d5f0; font-size: 15.5px; }
.pied-dedans { width: min(var(--large), 100% - 40px); margin-inline: auto; padding: 56px 0 36px; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; }
.pied h2 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 14px; }
.pied p { margin: 0; }
.pied a { color: #e6ecfa; text-decoration: none; }
.pied a:hover { color: #fff; text-decoration: underline; }
.pied-club img { height: 58px; width: auto; margin-bottom: 16px; }
.pied-liens { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pied-bas { margin: 0; padding: 18px 20px; text-align: center; font-size: 14px; border-top: 1px solid rgba(255, 255, 255, .12); color: #9fb0d8; }
@media (max-width: 860px) { .pied-dedans { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .pied-dedans { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
