/* Pont Au Golf — PWA. Direction « Clubhouse héritage » :
   vert fairway profond, papier crème, laiton discret. Typo Fraunces + Mulish.
   UX seniors : gros corps, fort contraste, peu de clics. Motifs golf, animations balle/putt. */

:root {
  /* Palette « Clubhouse Prestige » (rehaussée 15/06) — verts statutaires, parchemin chaud,
     contrastes vérifiés WCAG AA. */
  --fairway: #164027;       /* vert profond statutaire (primaire) */
  --fairway-deep: #0b2616;  /* titres majeurs, contraste maximal */
  --fairway-soft: #eaf2ed;  /* fond doux badge/bouton secondaire */
  --moss: #527845;          /* accent vert secondaire */
  --paper: #f6f3ea;         /* parchemin chaud (fond, jamais blanc froid) */
  --paper-2: #fffdf8;       /* quasi-blanc chaud (surface carte, détache du fond) */
  --ink: #111610;           /* presque noir, lisibilité parfaite */
  --muted: #4a5247;         /* texte secondaire assombri → AA (7.3:1) */
  --line: #dcd3be;          /* filet type club */
  --brass: #a3793d;         /* laiton brossé vieilli (fills/décoratif) */
  --brass-text: #8a6a33;    /* laiton foncé pour PETIT texte (AA 4.5:1) */
  --brass-soft: #fcf6eb;    /* mise en avant douce */
  --flag: #bc2f23;          /* rouge drapeau vif (urgences) */
  --flag-soft: #fdf0ee;
  --sky: #eaf0e6;
  --tap: 54px;
  --maxw: 680px;
  /* Ombres portées organiques (relief réel, 2 couches) */
  --shadow-sm: 0 2px 8px rgba(11,38,22,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 16px 32px -12px rgba(11,38,22,.15), 0 4px 8px -2px rgba(11,38,22,.05);
  /* Rayons exclusifs (tokens) */
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  font-size: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
/* App fixe (demande club 21/07/2026) : pas de zoom de page par pincement ni
   double-tap — la taille du texte se règle via le réglage système (app.js) et
   les photos se zooment dans la visionneuse. */
html, body { touch-action: pan-x pan-y; }
body {
  font-family: "Mulish", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(120% 80% at 50% 120%, rgba(31,81,52,.06), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { max-width: 100%; }

.font-display { font-family: "Fraunces", Georgia, serif; }

/* ----- Layout ----- */
.app { min-height: 100dvh; display: flex; flex-direction: column; }
.screen { flex: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 18px 20px 104px; }
.screen.no-nav { padding-bottom: 32px; }

/* ----- Top bar : barre de clubhouse ----- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  /* Voile vert chaud sur la vue aérienne du domaine (vraie photo du club) */
  background:
    linear-gradient(100deg, rgba(11,38,22,.94) 0%, rgba(22,64,39,.86) 46%, rgba(22,64,39,.55) 100%),
    var(--topbar-img, url("club-aerien.jpg"));
  background-size: cover; background-position: center 30%;
  color: #f6f3e9;
  display: flex; align-items: center; gap: 13px;
  padding: 13px 16px; padding-top: max(13px, env(safe-area-inset-top));
  border-bottom: 3px solid var(--brass);
  box-shadow: 0 10px 26px -18px rgba(0,0,0,.7);
}
.topbar .logo { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 11px; background: #f6f3e9; display:flex; align-items:center; justify-content:center; box-shadow: inset 0 0 0 1px rgba(0,0,0,.05); text-decoration:none; transition: transform .12s ease; }
.topbar .logo:active { transform: scale(.94); }
.topbar .logo svg { width: 27px; height: 27px; }
.topbar .logo img { width: 31px; height: 31px; object-fit: contain; display: block; }
.topbar .topbar-id { color: inherit; text-decoration: none; min-width: 0; display:block; }
.topbar h1 { font-family:"Fraunces",serif; font-size: 1.22rem; margin: 0; font-weight: 600; letter-spacing: .1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.topbar .sub { font-size: .74rem; opacity: .9; margin-top: -1px; font-weight: 600; letter-spacing:.2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-shadow: 0 1px 6px rgba(0,0,0,.3); }
.topbar .spacer { flex: 1; }
.topbar .topbar-home { flex:0 0 auto; width:38px; height:38px; border-radius:50%; display:flex; align-items:center; justify-content:center; color:#f6f3e9; background: rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.22); text-decoration:none; transition: background .14s ease, transform .12s ease; }
.topbar .topbar-home:hover { background: rgba(255,255,255,.24); }
.topbar .topbar-home:active { transform: scale(.92); }
.topbar .topbar-home .ico { width:21px; height:21px; }

/* ----- Headings ----- */
h2 { font-family:"Fraunces",serif; font-size: 1.5rem; font-weight: 600; letter-spacing: -.2px; margin: 22px 0 10px; }
h3 { font-family:"Fraunces",serif; font-size: 1.18rem; font-weight: 600; margin: 14px 0 8px; }
p { margin: 8px 0; }
.lead { font-size: 1.05rem; color: var(--muted); }
.eyebrow { font-size: .76rem; letter-spacing: .18em; text-transform: uppercase; color: var(--brass-text); font-weight: 800; }

/* ----- Cards ----- */
.card {
  position: relative;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px; margin: 14px 0;
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-top: 0; }
.card .meta { font-size: .82rem; color: var(--muted); display:flex; gap:12px; align-items:center; flex-wrap: wrap; }

/* Fil : corps d'annonce en vrais paragraphes, replié si long (retour club 20/07/2026) */
.post-body p { margin: 0 0 10px; }
.post-body p:last-child { margin-bottom: 0; }
/* Repli par hauteur maximale (pas de -webkit-line-clamp : comportement non défini
   sur un conteneur multi-paragraphes, texte superposé sur Safari iOS). Les em
   suivent la taille de police, y compris le texte agrandi sur iPhone. */
.post-body.clamped {
  max-height: 8em; /* ≈ 5 lignes à interligne 1.6 */
  overflow: hidden;
  position: relative;
}
.post-body.clamped::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2em;
  background: linear-gradient(rgba(255, 253, 248, 0), var(--paper-2));
}
.read-more {
  background: none; border: none; padding: 8px 0 0; margin: 0;
  color: var(--fairway); font-family: inherit; font-weight: 800; font-size: .92rem;
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.feed-sep { margin: 20px 0 4px; }
.feed-chevron { color: var(--brass); font-size: .95rem; }

/* ----- Buttons ----- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: var(--tap); padding: 13px 26px; border-radius: 12px;
  font-family: "Mulish", sans-serif; font-size: 1.05rem; font-weight: 800; letter-spacing: .2px;
  border: 1.5px solid transparent; cursor: pointer; text-decoration: none; width: 100%;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--fairway); color: #f6f3e9; box-shadow: 0 10px 22px -14px rgba(31,81,52,.9); }
.btn-primary:active { background: var(--fairway-deep); }
.btn-ghost { background: transparent; color: var(--fairway-deep); border-color: var(--fairway); }
.btn-brass { background: var(--brass); color: #2a2008; }
.btn-soft { background: var(--fairway-soft); color: var(--fairway-deep); }
.btn-danger { background: #fff; color: var(--flag); border-color: var(--flag); }
.btn[disabled] { opacity: .55; }
.btn.small { width: auto; min-height: 44px; padding: 9px 16px; font-size: .92rem; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { width: auto; flex: 1; }
.btn .ico { width: 20px; height: 20px; }
/* taille par défaut d'une icône au trait (évite un SVG sans dimensions qui déborde) */
.ico { width: 1.1em; height: 1.1em; }
/* icône en tête de titre (admin) : inline, alignée, teintée laiton */
h2 .ico, h3 .ico { width: 1.05em; height: 1.05em; vertical-align: -.16em; margin-right: .42em; color: var(--brass-text); }

/* putt ripple : petite balle qui file au clic */
.putt-ball {
  position: absolute; width: 13px; height: 13px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #d9d4c4);
  box-shadow: 0 1px 2px rgba(0,0,0,.3); pointer-events: none; z-index: 2;
  animation: puttGo .55s cubic-bezier(.22,.7,.3,1) forwards;
}
@keyframes puttGo {
  0% { transform: translateX(-10px) scale(.7); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: translateX(120px) scale(1) rotate(360deg); opacity: 0; }
}

/* ----- Forms ----- */
label { display: block; font-weight: 800; margin: 14px 0 6px; font-size: .98rem; }
input, textarea, select {
  width: 100%; font-family: inherit; font-size: 1.08rem; padding: 14px; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 11px; background: #fff;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--fairway); box-shadow: 0 0 0 3px var(--fairway-soft); }
textarea { min-height: 120px; resize: vertical; }
/* Champs date/heure : sur iOS Safari ils gardent une largeur interne native qui ignore
   width:100% et déborde du cadre à droite. On neutralise l'apparence native (le sélecteur
   natif s'ouvre toujours au tap) et on borne la largeur : le champ tient dans le cadre. */
input[type="date"], input[type="datetime-local"], input[type="time"] {
  -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%;
}
input[type="date"]::-webkit-date-and-time-value,
input[type="datetime-local"]::-webkit-date-and-time-value,
input[type="time"]::-webkit-date-and-time-value { text-align: left; margin: 0; }
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator { margin-left: auto; }
.hint { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.otp-input { letter-spacing: .55em; text-align: center; font-size: 1.7rem; font-weight: 800; font-family:"Fraunces",serif; }
/* Deux champs sur une même ligne : grille « à plat ». Libellés, champs et notes vivent sur des
   rangées de grille distinctes (label,label / input,input / hint,hint), donc les champs restent
   TOUJOURS alignés même si un libellé passe sur deux lignes et l'autre non, sur n'importe quel
   écran. min-width:0 empêche tout débordement horizontal. */
.form-2col { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; align-items: start; margin-top: 14px; }
.form-2col > label { margin: 0 0 6px; align-self: end; }
.form-2col > input, .form-2col > select { min-width: 0; align-self: start; }
.field-hint { display: block; font-weight: 600; font-size: .82rem; color: var(--muted); margin: 5px 2px 0; }
.form-note { font-size: .88rem; color: var(--muted); margin: 6px 0 0; }
.label-opt { font-weight: 600; color: var(--muted); }
.is-hidden { display: none !important; }

/* ----- Notices parcours (alertes) : style « avis du club », sans liséré ----- */
.notice {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 15px 17px; margin: 8px 0 16px; box-shadow: var(--shadow-sm);
}
.notice .flag { width: 34px; height: 34px; flex: 0 0 auto; }
.notice h4 { font-family:"Fraunces",serif; margin: 0 0 2px; font-size: 1.06rem; font-weight: 600; }
.notice p { margin: 0; font-size: .95rem; color: var(--muted); }
.notice .when { font-size:.74rem; color: var(--brass-text); font-weight:800; letter-spacing:.1em; text-transform:uppercase; margin-top:4px; }
.notice.prio-urgente { background: linear-gradient(0deg, var(--flag-soft), var(--paper-2)); }
.notice.prio-urgente .flag path.cloth { fill: var(--flag); }
.notice.prio-importante .flag path.cloth { fill: var(--brass); }
.notice.prio-info .flag path.cloth { fill: var(--fairway); }

/* ----- Sélecteur de rubrique (espace gestion) : menu déroulant, tout tient en haut de page ----- */
.admin-select-label { margin: 6px 0 6px; }
.admin-select {
  font-weight: 800; font-size: 1.02rem; margin-bottom: 16px;
  background-color: #fff; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23164027' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
  appearance: none; -webkit-appearance: none; padding-right: 42px;
}

/* étiquette catégorie : point + label, monochrome */
.tag { display:inline-flex; align-items:center; gap:6px; font-size:.74rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; color: var(--muted); }
.tag .dot { width:8px; height:8px; border-radius:50%; background: var(--moss); }
.tag.t-sportif .dot { background: var(--fairway); }
.tag.t-parcours .dot { background: var(--brass); }
.tag.t-convivialite .dot { background: var(--flag); }
.tag.t-info .dot { background: var(--moss); }
.pin { display:inline-flex; align-items:center; gap:5px; color: var(--brass-text); font-weight: 800; font-size: .74rem; letter-spacing:.06em; text-transform:uppercase; }

/* ----- Bottom nav ----- */
.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  background: rgba(251,248,240,.96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-around; padding: 8px 4px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}
.bottomnav a {
  position: relative; flex: 1; text-align: center; text-decoration: none; color: var(--muted);
  font-size: .72rem; font-weight: 800; padding: 4px 2px; display:flex; flex-direction:column; align-items:center; gap:3px;
}
.bottomnav a .ico { width: 25px; height: 25px; }
.bottomnav a[aria-current="page"] { color: var(--fairway); }
.bottomnav a[aria-current="page"]::after {
  content:""; position:absolute; bottom:-4px; width:6px; height:6px; border-radius:50%;
  background: radial-gradient(circle at 35% 30%, #fff, #cfe0c8); box-shadow: 0 0 0 2px var(--fairway);
}

/* ----- Tiles ----- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.tile {
  position: relative; background: var(--paper-2); border: 1px solid var(--line); border-radius: 15px;
  padding: 18px 14px; text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; align-items: flex-start; gap: 9px; min-height: 116px; justify-content: space-between;
  box-shadow: var(--shadow-sm); transition: transform .14s ease, box-shadow .2s ease;
  overflow: hidden;
}
.tile:active { transform: translateY(1px); }
.tile .ico { width: 30px; height: 30px; color: var(--fairway); }
.tile .lbl { font-family:"Fraunces",serif; font-weight: 600; font-size: 1.02rem; line-height:1.2; }
.tile.soon { opacity: .82; }
.tile .soon-tag { font-size: .64rem; font-weight: 800; letter-spacing:.1em; text-transform:uppercase; color: var(--brass-text); }
.tile::after {
  content:""; position:absolute; right:-18px; bottom:-18px; width:64px; height:64px; border-radius:50%;
  background: radial-gradient(circle at 30% 30%, rgba(31,81,52,.05), transparent 60%);
}

/* ----- Hero (accueil) : photo de parcours (golden hour) + plaque clubhouse ----- */
.hero { position: relative; overflow: hidden; }
.hero .scene { display:block; width: 100%; height: 230px; object-fit: cover; object-position: center 42%; margin-bottom: -4px; background: var(--fairway-deep); }
.hero .hero-plate {
  background: var(--fairway); color: #f6f3e9; text-align: center;
  padding: 16px 20px 22px; border-bottom: 3px solid var(--brass);
}
.hero .hero-seal {
  width: 78px; height: 78px; margin: -55px auto 8px; border-radius: 21px;
  background: var(--paper); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 30px -12px rgba(11,38,22,.55), inset 0 0 0 1px rgba(163,121,61,.4);
  position: relative;
}
.hero .hero-seal img { width: 56px; height: 56px; object-fit: contain; display: block; }
.hero .hero-plate .eyebrow { color: #e9dcb8; }
.hero h1 { font-family:"Fraunces",serif; font-weight:600; font-size: 2rem; margin: 4px 0 2px; letter-spacing: -.5px; }
.hero .hero-tagline { margin: 0; font-size: 1.02rem; opacity: .92; }
/* Logo complet posé sur pastille crème, entre l'eyebrow et la baseline (accueil) */
.hero .hero-wordmark { margin: 12px 0 8px; display: flex; justify-content: center; }
.hero .hero-wordmark img {
  width: min(236px, 78%); height: auto; display: block; box-sizing: border-box;
  background: var(--paper); border-radius: 16px; padding: 13px 20px;
  box-shadow: 0 14px 30px -12px rgba(11,38,22,.55), inset 0 0 0 1px rgba(163,121,61,.4);
}

/* ----- Logo complet sur surface claire (login) ----- */
.login-logo { text-align: center; margin: 2px 0 18px; }
.login-logo img { width: min(248px, 70%); height: auto; display: block; margin: 0 auto; }

/* ----- Badge biodiversité (label officiel ffgolf) ----- */
.bio-engage { display: flex; gap: 16px; align-items: flex-start; }
.bio-engage .bio-engage-txt { min-width: 0; }
.bio-engage .bio-badge { flex: 0 0 auto; width: 92px; height: auto; display: block; margin-top: 2px; }
.bio-label-note { margin: 10px 0 0; font-size: .86rem; color: var(--muted); }
@media (max-width: 460px) {
  .bio-engage { flex-direction: column; align-items: center; text-align: center; }
  .bio-engage .bio-badge { width: 108px; margin: 2px auto 4px; }
  .bio-engage .meta { justify-content: center; display: flex; }
}

/* ----- Divers ----- */
.center { text-align: center; }
.muted { color: var(--muted); }
.divider { display:flex; align-items:center; gap:12px; margin: 22px 0; }
.divider::before, .divider::after { content:""; height:1px; background: var(--line); flex:1; }
.divider .ball { width: 12px; height:12px; border-radius:50%; background: radial-gradient(circle at 35% 30%, #fff, #d9d4c4); box-shadow:0 1px 2px rgba(0,0,0,.2); }
.powered { text-align: center; font-size: .74rem; color: var(--muted); padding: 22px 14px 6px; display:flex; flex-wrap:wrap; gap: 3px 7px; align-items:center; justify-content:center; line-height:1.4; }
.powered > span { white-space: nowrap; }
.powered b { color: var(--fairway-deep); font-weight:800; }
.cv-link { color: var(--fairway-deep); font-weight: 800; text-decoration: none; border-bottom: 1px solid rgba(22,64,39,.32); }
.cv-link:hover { color: var(--brass-text); border-bottom-color: var(--brass); }
/* utilitaires typographie */
.nowrap { white-space: nowrap; }
.reassure-line { text-align:center; color: var(--muted); font-size: .8rem; margin: 8px 0 2px; display:flex; flex-wrap:wrap; gap:3px 7px; align-items:center; justify-content:center; line-height:1.4; }
.reassure-line .dotsep { opacity:.6; }
.install-steps { margin: 6px 0 12px; padding-left: 20px; line-height: 1.6; font-size: .92rem; }
.install-steps li { margin-bottom: 3px; }
.empty { text-align: center; color: var(--muted); padding: 44px 16px; }
.empty .ico { width: 56px; height: 56px; color: var(--moss); margin-bottom: 6px; }
.section-head { display:flex; align-items:baseline; justify-content:space-between; gap:10px; }

.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(8px);
  background: var(--fairway-deep); color: #f6f3e9; padding: 13px 22px; border-radius: 999px;
  font-weight: 800; z-index: 60; box-shadow: var(--shadow-md); max-width: 90%;
  opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none;
  border: 1px solid rgba(255,255,255,.12);
}
.toast.show { opacity: 1; transform: translateX(-50%); }

.demo-flag {
  background: var(--brass); color: #2a2008; text-align: center; font-weight: 800;
  font-size: .76rem; letter-spacing: .02em; padding: 6px 12px;
}

/* ----- Putt sweep : balle qui roule sous la topbar au changement de vue ----- */
.putt-sweep { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 50; pointer-events:none; overflow:hidden; }
.putt-sweep .grass { position:absolute; inset:0; background: linear-gradient(90deg, transparent, var(--moss), transparent); opacity:.5; }
.putt-sweep .ball { position:absolute; top:-5px; left:-16px; width:13px; height:13px; border-radius:50%;
  background: radial-gradient(circle at 35% 30%, #fff, #d9d4c4); box-shadow:0 1px 2px rgba(0,0,0,.25);
  animation: sweep .6s cubic-bezier(.3,.6,.3,1) forwards; }
@keyframes sweep { from { left:-16px; transform: rotate(0); } to { left: 102%; transform: rotate(900deg); } }

/* ----- Ball drop (succès connexion) ----- */
.hole-celebrate { display:flex; flex-direction:column; align-items:center; padding: 12px 0; }
.hole-celebrate svg { width: 130px; height: 96px; }
.hole-celebrate .ball-drop { animation: dropIn 1s cubic-bezier(.3,.1,.4,1) forwards; transform-origin:center; }
@keyframes dropIn {
  0% { transform: translateY(-66px) scale(1); }
  60% { transform: translateY(0) scale(1); }
  72% { transform: translateY(-10px) scale(1.06,.94); }
  84% { transform: translateY(0) scale(1); }
  100% { transform: translateY(0) scale(.22); opacity:.15; }
}

/* reveal au montage */
.reveal > * { animation: fadeUp .5s both; }
.reveal > *:nth-child(2){ animation-delay:.05s } .reveal > *:nth-child(3){ animation-delay:.1s }
.reveal > *:nth-child(4){ animation-delay:.15s } .reveal > *:nth-child(5){ animation-delay:.2s }
.reveal > *:nth-child(n+6){ animation-delay:.24s }
@keyframes fadeUp { from { opacity:0; transform: translateY(10px);} to { opacity:1; transform:none; } }

/* ----- Météo du parcours ----- */
.wx { display:flex; align-items:center; gap:16px; }
.wx .now { display:flex; align-items:center; gap:10px; }
.wx .now .emoji { font-size:2.4rem; line-height:1; }
.wx .now .temp { font-family:"Fraunces",serif; font-size:2rem; font-weight:600; }
.wx .now .lbl { font-size:.85rem; color:var(--muted); }
.wx .fc { display:flex; gap:10px; overflow-x:auto; margin-left:auto; }
.wx .fc div { text-align:center; flex:0 0 auto; font-size:.75rem; color:var(--muted); }
.wx .fc .e { font-size:1.2rem; display:block; }
.wx .fc .mm { font-weight:800; color:var(--ink); }

/* ----- Événements / cours ----- */
.row-item { display:flex; flex-direction:column; gap:8px; }
.capbar { height:7px; border-radius:99px; background:var(--line); overflow:hidden; }
.capbar > i { display:block; height:100%; background:var(--fairway); }
.statline { display:flex; gap:10px; align-items:center; flex-wrap:wrap; font-size:.84rem; color:var(--muted); }
.fee { font-weight:800; color:var(--brass); }
.status-pill { display:inline-flex; align-items:center; gap:6px; font-size:.74rem; font-weight:800; letter-spacing:.04em; text-transform:uppercase; padding:3px 10px; border-radius:999px; }
.sp-inscrit { background:var(--fairway-soft); color:var(--fairway-deep); }
.sp-attente { background:var(--brass-soft); color:#7a5b1e; }
.sp-regle { background:var(--fairway-soft); color:var(--fairway-deep); }
.sp-att-reg { background:var(--flag-soft); color:#7a2a22; }

/* ----- Assistant (chat) ----- */
.chat-wrap { display:flex; flex-direction:column; min-height:60vh; }
.chat-log { flex:1; display:flex; flex-direction:column; gap:10px; padding:6px 0 14px; }
.bubble { max-width:86%; padding:12px 15px; border-radius:16px; font-size:1rem; line-height:1.5; animation:fadeUp .3s both; }
.bubble.bot { align-self:flex-start; background:var(--paper-2); border:1px solid var(--line); border-bottom-left-radius:5px; }
.bubble.me { align-self:flex-end; background:var(--fairway); color:#f6f3e9; border-bottom-right-radius:5px; }
.bubble .src { display:block; margin-top:8px; font-size:.74rem; color:var(--brass-text); font-weight:700; }
a.src-link { text-decoration:none; border-bottom:1px solid rgba(163,121,61,.4); }
a.src-link:hover { color:var(--brass); border-bottom-color:var(--brass); }
/* indicateur de saisie (3 points) — pas d'astérisque ni marqueur technique */
.bubble.typing { display:flex; gap:5px; align-items:center; }
.bubble.typing span { width:7px; height:7px; border-radius:50%; background:var(--moss); opacity:.5; animation:typingDot 1s infinite ease-in-out; }
.bubble.typing span:nth-child(2){ animation-delay:.15s } .bubble.typing span:nth-child(3){ animation-delay:.3s }
@keyframes typingDot { 0%,60%,100%{ transform:translateY(0); opacity:.4 } 30%{ transform:translateY(-4px); opacity:.9 } }
.chat-bar { position:sticky; bottom:0; display:flex; gap:8px; padding:10px 0; background:linear-gradient(0deg,var(--paper) 70%,transparent); }
.chat-bar input { flex:1; }
.chat-bar .btn { width:auto; min-height:50px; padding:0 18px; }
.chat-sugg-wrap { margin-bottom:8px; }
.chat-sugg-label { font-size:.72rem; font-weight:700; letter-spacing:.4px; text-transform:uppercase; color:var(--muted); margin:2px 0 7px; }
.chat-sugg { display:flex; gap:8px; flex-wrap:wrap; }
.chat-sugg button { font-size:.84rem; min-height:44px; padding:8px 13px; border-radius:999px; border:1.5px solid var(--line); background:#fff; color:var(--fairway-deep); font-weight:700; cursor:pointer; transition:border-color .14s ease, background .14s ease; }
.chat-sugg button:hover { border-color:var(--brass); background:var(--brass-soft); }

/* ----- Bouton flottant Assistant ----- */
.fab { position:fixed; right:16px; bottom:calc(84px + env(safe-area-inset-bottom)); z-index:45; width:60px; height:60px; border-radius:50%;
  background:var(--fairway); color:#f6f3e9; border:0; box-shadow:var(--shadow-md); cursor:pointer; padding:0;
  display:flex; align-items:center; justify-content:center; line-height:0; }
.fab svg { width:28px; height:28px; }
.fab .pellet { position:absolute; top:-2px; right:-2px; width:14px; height:14px; border-radius:50%; background:var(--brass); border:2px solid var(--paper); }

/* ====== ANIMATIONS IMMERSIVES (réversibles) ======
   Tout est gaté par body.immersive (posé par app.js : const IMMERSIVE).
   Pour revenir en arrière : passer IMMERSIVE=false dans app.js → ces effets disparaissent,
   les animations de base (putt, ball-drop, reveal) restent. Coupé par prefers-reduced-motion. */
.immersive .hero .scene { animation: kenburns 20s ease-in-out infinite alternate; transform-origin: 60% 70%; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.05); } }
.immersive .notice .flag .cloth { transform-origin: 7px 8px; animation: flagWave 3.4s ease-in-out infinite; }
@keyframes flagWave { 0%,100% { transform: skewX(0) scaleX(1); } 50% { transform: skewX(-6deg) scaleX(.96); } }
.immersive .card, .immersive .tile { transition: transform .18s ease, box-shadow .25s ease; }
@media (hover: hover) {
  .immersive .card:hover, .immersive .tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
}
.immersive .btn-primary { transition: transform .12s ease, box-shadow .25s ease, background .2s ease; }
.immersive .btn-primary:hover { box-shadow: 0 14px 28px -12px rgba(11,38,22,.55); }

@media (min-width: 560px) {
  :root { font-size: 19px; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: 2.4rem; }
  .hero .scene { height: 300px; }
}

/* ===== Bandeau "photo du mois" sur la bannière d'accueil (rewarding) ===== */
.hero-potm { position:absolute; left:10px; top:10px; z-index:3; display:inline-flex; align-items:center; gap:5px;
  background:rgba(11,38,22,.62); color:#fff; text-decoration:none;
  padding:4px 9px; border-radius:999px; font-size:.66rem; font-weight:600; letter-spacing:.01em;
  box-shadow:0 2px 8px rgba(0,0,0,.22); backdrop-filter:blur(2px); }
.hero-potm .ico { width:13px; height:13px; }

/* ===== Fil : case liée à un album (annonce d'une nouvelle galerie) ===== */
.card-gallery-link { display:flex; align-items:center; gap:8px; margin-top:14px; padding-top:12px;
  border-top:1px solid var(--line); text-decoration:none; color:var(--fairway-deep); font-weight:600; font-size:.92rem; }
.card-gallery-link .ico { width:18px; height:18px; }

/* ===== Notification "nouvelles photos" dans le fil ===== */
.gal-notice { display:flex; align-items:center; gap:12px; text-decoration:none; color:var(--ink);
  background:var(--paper-2); border:1px solid var(--line); border-left:4px solid var(--brass);
  border-radius:var(--radius-md); padding:11px 13px; margin-bottom:13px; box-shadow:var(--shadow-sm); }
.gal-notice-thumb { flex:0 0 auto; width:48px; height:48px; border-radius:10px; overflow:hidden; background:var(--fairway-soft); display:flex; align-items:center; justify-content:center; color:var(--fairway); }
.gal-notice-thumb img { width:100%; height:100%; object-fit:cover; }
.gal-notice-txt { flex:1; display:flex; flex-direction:column; line-height:1.25; }
.gal-notice-txt b { color:var(--fairway-deep); }
.gal-notice-txt span { font-size:.86rem; color:var(--muted); }
.gal-notice-go { color:var(--brass); flex:0 0 auto; }
.gal-notice-go .ico { width:22px; height:22px; }

/* ===== Galerie : albums ===== */
.albums { display:grid; grid-template-columns:1fr 1fr; gap:13px; }
.album-card { text-decoration:none; color:inherit; background:var(--paper-2); border:1px solid var(--line); border-radius:var(--radius-md); overflow:hidden; box-shadow:var(--shadow-sm); display:flex; flex-direction:column; }
.album-cover { position:relative; aspect-ratio:4/3; background:var(--fairway-soft); }
.album-cover img { width:100%; height:100%; object-fit:cover; display:block; }
.album-count { position:absolute; right:8px; bottom:8px; display:inline-flex; align-items:center; gap:4px; background:rgba(11,38,22,.78); color:#fff; font-size:.74rem; font-weight:800; padding:3px 8px; border-radius:999px; }
.album-count .ico { width:14px; height:14px; }
.album-meta { padding:11px 12px 13px; }
.album-meta h3 { margin:6px 0 2px; font-size:1.02rem; }
.album-meta .muted { font-size:.82rem; }

/* ===== Photo du mois (carte mise en avant) ===== */
.potm { display:block; position:relative; border-radius:var(--radius-lg); overflow:hidden; margin-bottom:16px; box-shadow:var(--shadow-md); text-decoration:none; color:#fff; touch-action:manipulation; }
.potm img { width:100%; height:210px; object-fit:cover; display:block; }
.potm-ribbon { position:absolute; top:12px; left:12px; display:inline-flex; align-items:center; gap:6px; background:linear-gradient(100deg,var(--brass),#caa256); color:#fff; padding:6px 12px; border-radius:999px; font-weight:800; font-size:.8rem; box-shadow:0 4px 12px rgba(0,0,0,.25); }
.potm-ribbon .ico { width:16px; height:16px; }
.potm-foot { position:absolute; left:0; right:0; bottom:0; padding:26px 14px 12px; background:linear-gradient(0deg,rgba(11,38,22,.82),transparent); display:flex; flex-direction:column; gap:1px; }
.potm-foot b { font-family:"Fraunces",serif; font-size:1.1rem; }
.potm-foot span { font-size:.82rem; opacity:.92; }

/* ===== Album : grille de photos ===== */
.back-link { display:inline-flex; align-items:center; gap:6px; text-decoration:none; color:var(--fairway-deep); font-weight:700; font-size:.9rem; margin-bottom:8px; }
.back-link .ico { width:18px; height:18px; }
.photo-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.ph-thumb { position:relative; padding:0; border:none; background:var(--fairway-soft); border-radius:var(--radius-md); overflow:hidden; aspect-ratio:1/1; cursor:pointer; touch-action:manipulation; }
.ph-thumb img { width:100%; height:100%; object-fit:cover; display:block; transition:transform .3s ease; }
@media (hover:hover){ .ph-thumb:hover img { transform:scale(1.05); } }
.ph-likes { position:absolute; right:7px; bottom:7px; display:inline-flex; align-items:center; gap:4px; background:rgba(11,38,22,.74); color:#fff; font-size:.72rem; font-weight:800; padding:3px 7px; border-radius:999px; }
.ph-likes .ico { width:13px; height:13px; }

/* ===== Lightbox ===== */
/* touch-action: manipulation = désactive le DOUBLE-TAP zoom (qui restait bloqué et cassait la mise
   en page) MAIS garde le pinch-zoom à deux doigts classique. */
.lightbox { position:fixed; inset:0; z-index:60; background:rgba(11,22,16,.92); display:flex; flex-direction:column; justify-content:center; animation:fadeUp .2s both; touch-action:manipulation; }
.lb-close { position:absolute; top:max(12px,env(safe-area-inset-top)); right:14px; z-index:3; width:42px; height:42px; border-radius:50%; border:1px solid rgba(255,255,255,.25); background:rgba(255,255,255,.12); color:#fff; display:flex; align-items:center; justify-content:center; cursor:pointer; }
.lb-close .ico { width:22px; height:22px; }
.lb-stage { position:relative; display:flex; align-items:center; justify-content:center; padding:0 8px; overflow:hidden; }
.lb-stage img { max-width:100%; max-height:68vh; border-radius:10px; box-shadow:0 18px 40px rgba(0,0,0,.5); touch-action:none; }
/* Flèches en OVERLAY sur les bords de la photo (visibles sur iOS), contraste fort : fond sombre
   + flou + ombre pour se lire sur une zone claire comme sombre. Jamais coupées (insets safe-area). */
.lb-nav { position:absolute; top:50%; transform:translateY(-50%); z-index:2; width:46px; height:46px; border-radius:50%; border:1px solid rgba(255,255,255,.42); background:rgba(11,22,16,.55); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); color:#fff; font-size:1.7rem; line-height:1; display:flex; align-items:center; justify-content:center; cursor:pointer; box-shadow:0 4px 14px rgba(0,0,0,.45); }
.lb-nav.prev { left:max(14px,env(safe-area-inset-left)); }
.lb-nav.next { right:max(14px,env(safe-area-inset-right)); }
.lb-nav:active { background:rgba(11,22,16,.8); }
.lb-foot { padding:16px 18px max(18px,env(safe-area-inset-bottom)); color:#fff; }
.lb-author { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.lb-count { font-size:.8rem; opacity:.72; font-variant-numeric:tabular-nums; white-space:nowrap; }
.lb-author { text-align:center; font-size:.92rem; margin-bottom:12px; opacity:.92; }
.lb-author b { color:#fff; }
.reacts { display:flex; gap:10px; justify-content:center; }
.react { display:inline-flex; align-items:center; gap:7px; padding:10px 16px; border-radius:999px; border:1.5px solid rgba(255,255,255,.28); background:rgba(255,255,255,.1); color:#fff; font-weight:800; font-size:.92rem; cursor:pointer; transition:transform .12s ease, background .15s ease, border-color .15s ease; }
.react .ico { width:20px; height:20px; }
.react:active { transform:scale(.92); }
.react.on { background:var(--brass); border-color:var(--brass); color:#fff; }
.react.on .ico { fill:rgba(255,255,255,.25); }

/* fichier upload stylé en bouton */
.file-btn { display:inline-flex; align-items:center; gap:7px; cursor:pointer; }

/* photos proposées par les adhérents (file de validation admin) */
.sub-row { display:flex; align-items:center; gap:12px; flex-wrap:wrap; border-top:1px solid var(--line); padding:12px 0; }
.sub-thumb { width:64px; height:64px; border-radius:10px; flex:0 0 auto; border:1px solid var(--line); padding:0; background:var(--fairway-soft); overflow:hidden; cursor:pointer; touch-action:manipulation; }
.sub-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
/* Grille de retrait des photos d'un album (onglet Galerie, admin) */
.ga-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(76px, 1fr)); gap:8px; }
.ga-ph { position:relative; padding:0; border:1px solid var(--line); background:var(--fairway-soft); border-radius:10px; overflow:hidden; aspect-ratio:1/1; cursor:pointer; touch-action:manipulation; }
.ga-ph img { width:100%; height:100%; object-fit:cover; display:block; }
.ga-ph .ga-x { position:absolute; top:4px; right:4px; width:22px; height:22px; display:flex; align-items:center; justify-content:center; background:rgba(14,44,26,.72); color:#f6f3ea; border-radius:50%; font-size:12px; line-height:1; }
.sub-meta { flex:1 1 120px; min-width:0; display:flex; flex-direction:column; gap:2px; }
.sub-meta .muted { font-size:.85rem; }
.sub-actions { display:flex; gap:8px; flex:0 0 auto; }

/* barre d'adoption (admin Membres) */
.adopt-bar { height:10px; border-radius:999px; background:var(--fairway-soft); overflow:hidden; margin:10px auto 0; max-width:280px; }
.adopt-bar span { display:block; height:100%; background:linear-gradient(90deg,var(--fairway),var(--brass)); border-radius:999px; }

/* bloc d'information (cours, biodiversité) */
.info-block { border-left:4px solid var(--brass); }

/* ----- Blocs engagement (Bénévoles en action, GIGN) ----- */
.eng-lead { font-family:"Fraunces",serif; font-size:1.12rem; line-height:1.4; color: var(--fairway); margin:.1em 0 .55em; }
.eng-text p { margin:.5em 0; }
/* Liste des rôles : présentation éditoriale, séparateurs discrets (pas de puces criardes) */
.eng-roles-intro { font-weight:800; margin:1em 0 .1em; }
.eng-roles { list-style:none; margin:.2em 0 0; padding:0; }
.eng-roles li { padding:11px 0; border-top:1px solid var(--line); line-height:1.5; }
.eng-roles li:first-child { border-top:none; }
.eng-roles b { color: var(--fairway-deep); }
/* Liste simple (énumérations GIGN) : petit repère laiton, pas de puce navigateur criarde */
.eng-list { list-style:none; margin:.4em 0 .2em; padding:0; }
.eng-list li { position:relative; padding:6px 0 6px 20px; line-height:1.5; }
.eng-list li::before { content:""; position:absolute; left:3px; top:.66em; width:7px; height:7px; border-radius:50%; background: var(--brass); }
/* Citation du président : bloc chaleureux et sobre, sans liséré coloré */
.eng-quote { margin:1.15em 0 .3em; padding:16px 18px; background: var(--paper-2); border-radius:14px; }
.eng-quote p { font-family:"Fraunces",serif; font-style:italic; font-size:1.08rem; line-height:1.5; margin:0; color: var(--fairway-deep); }
.eng-quote cite { display:block; margin-top:10px; font-style:normal; font-size:.76rem; font-weight:800; letter-spacing:.09em; text-transform:uppercase; color: var(--brass-text); }
/* Appel à rejoindre l'aventure */
.eng-closing { margin-top:1.15em; }
.eng-closing h3 { font-family:"Fraunces",serif; font-weight:600; font-size:1.14rem; margin:0 0 .3em; color: var(--fairway); }
.eng-closing p { margin:0; }
.eng-photos { display:grid; grid-template-columns: repeat(2, 1fr); gap:10px; }
.eng-photos .eng-ph { padding:0; border:0; background:none; cursor:pointer; display:block; border-radius:12px; }
.eng-photos img { width:100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; display:block; background: var(--fairway-deep); }
.eng-photos-empty {
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px;
  text-align:center; color: var(--muted); padding: 26px 16px; font-size:.9rem;
  border: 1px dashed var(--line); border-radius: 12px; background: var(--paper);
}
.eng-photos-empty .ico { width:34px; height:34px; color: var(--moss); }
.info-list { list-style:none; margin:8px 0 0; padding:0; }
.info-list li { padding:9px 0; border-top:1px solid var(--line); overflow:hidden; }
.info-list li:first-child { border-top:none; }
.info-amt { float:right; font-weight:800; color:var(--brass-text); margin-left:10px; }

/* fiche contact compacte (Infos) */
.contact-line { display:flex; justify-content:space-between; gap:12px; padding:9px 0; border-top:1px solid var(--line); }
.contact-line:first-of-type { border-top:none; }
.contact-k { color:var(--muted); font-weight:700; }
.contact-v { font-weight:700; color:var(--ink); text-align:right; text-decoration:none; }
a.contact-v, .contact-v a { color:var(--fairway-deep); }

/* bottom-nav à 5 entrées : un peu plus compact */
.bottomnav.nav5 a { font-size:.66rem; }
.bottomnav.nav5 a .ico { width:22px; height:22px; }

@media (min-width: 560px) {
  .albums { grid-template-columns:repeat(3,1fr); }
  .photo-grid { grid-template-columns:repeat(3,1fr); }
  .potm img { height:300px; }
}

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