:root {
  --bg: #0f1115;
  --bg-2: #14171e;
  --panel: #191c22;
  --panel-2: #1f232b;
  --text: #ecebf0;
  --muted: #a8a296;
  --line: #2a2f38;
  --gold: #e8b62c;
  --gold-deep: #b8891a;
  --gold-soft: rgba(232, 182, 44, .14);
  --shadow: 0 12px 34px rgba(0, 0, 0, .38);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
a { color: var(--gold); }
img { max-width: 100%; display: block; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(180deg, #16181d, #0f1115);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand img { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; }
.brand strong { display: block; font-size: 1.02rem; letter-spacing: .2px; }
.brand span { display: block; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  color: var(--text); text-decoration: none; font-weight: 700; font-size: .88rem;
  padding: 9px 13px; border-radius: 10px; transition: background .15s ease, color .15s ease;
}
.site-nav a:hover, .site-nav a.active { background: var(--gold-soft); color: var(--gold); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 8px 10px; font-size: 1.1rem; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(circle at 24% 12%, rgba(232,182,44,.16) 0%, transparent 45%), var(--bg-2);
  border-bottom: 1px solid var(--line);
  padding: 64px 0 56px;
  text-align: center;
}
.hero .eyebrow { font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 800; }
.hero h1 { margin: 10px 0 12px; font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -.01em; }
.hero p { margin: 0 auto; max-width: 640px; color: var(--muted); font-size: 1.02rem; }
.hero .cta { margin-top: 26px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 12px 20px; border-radius: 12px; font-weight: 800;
  text-decoration: none; font-size: .92rem; border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--gold); color: #14161b; }
.btn-primary:hover { background: #f2c750; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- Sections / panels ---------- */
section.page-section { padding: 56px 0; }
section.page-section + section.page-section { border-top: 1px solid var(--line); }
.section-head { text-align: center; margin-bottom: 34px; }
.section-head .eyebrow { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 800; }
.section-head h2 { margin: 8px 0 6px; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.section-head p { color: var(--muted); margin: 0; }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card { text-align: center; }
.card .avatar {
  width: 108px; height: 108px; border-radius: 50%; margin: 0 auto 14px; object-fit: cover;
  border: 2px solid var(--gold-soft);
}
.card h3 { margin: 4px 0 4px; font-size: 1.05rem; }
.card .role { color: var(--gold); font-size: .82rem; font-weight: 700; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .9rem; margin: 0; }

.flash { padding: 14px 16px; border-radius: 12px; margin: 18px 0; font-weight: 700; background: var(--gold-soft); border: 1px solid rgba(232,182,44,.4); color: var(--gold); }
.flash.ok { background: rgba(90, 200, 120, .12); border-color: rgba(90, 200, 120, .4); color: #6fd98c; }
.flash.err { background: rgba(224, 90, 90, .12); border-color: rgba(224, 90, 90, .4); color: #f08a8a; }

/* ---------- Video grid ---------- */
.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.video-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.video-card .frame { position: relative; padding-top: 56.25%; background: #000; }
.video-card .frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-card h3 { margin: 0; padding: 14px 16px; font-size: .96rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 30px 0; color: var(--muted); font-size: .82rem; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }

/* ---------- Login card (Espace Membre) ---------- */
.login-wrap { min-height: 60vh; display: grid; place-items: center; padding: 40px 16px; }
.login-card { width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 30px; text-align: center; }
.login-card img.logo { width: 70px; height: 70px; object-fit: contain; margin: 0 auto 12px; border-radius: 14px; }
.login-card h1 { margin: 0 0 4px; font-size: 1.2rem; }
.login-card .sub { margin: 0 0 18px; color: var(--muted); font-size: .88rem; }
.login-card label { display: block; text-align: left; font-weight: 700; font-size: .85rem; margin: 10px 0 4px; }
.login-card input { width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-size: .95rem; }
.login-card input:focus { outline: none; border-color: var(--gold); }
.login-card .btn { width: 100%; margin-top: 16px; }
.back-link { display: inline-block; margin-top: 16px; color: var(--muted); text-decoration: none; font-weight: 700; font-size: .85rem; }
.back-link:hover { color: var(--gold); }

.annuaire-list { display: grid; gap: 10px; }
.annuaire-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.annuaire-row strong { display: block; }
.annuaire-row span { color: var(--muted); font-size: .85rem; }

/* ---------- Galerie / lightbox ---------- */
.galerie-item { cursor: zoom-in; }
.galerie-item img { transition: transform .15s ease; }
.galerie-item:hover img { transform: scale(1.02); }

.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center; padding: 30px;
  background: rgba(6, 7, 9, .88);
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: 10px; box-shadow: 0 20px 50px rgba(0,0,0,.6); }
.lightbox figcaption { text-align: center; color: #ecebf0; margin-top: 12px; font-size: .9rem; }
.lightbox .lightbox-inner { max-width: 92vw; }
.lightbox-close {
  position: absolute; top: 18px; right: 22px; background: none; border: 1px solid rgba(255,255,255,.3);
  color: #ecebf0; width: 40px; height: 40px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; line-height: 1;
  z-index: 2;
}
.lightbox-close:hover { border-color: var(--gold); color: var(--gold); }

.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); background: none; border: 1px solid rgba(255,255,255,.3);
  color: #ecebf0; width: 48px; height: 48px; border-radius: 50%; font-size: 1.5rem; cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center; z-index: 2;
}
.lightbox-nav:hover { border-color: var(--gold); color: var(--gold); }
.lightbox-nav[disabled] { opacity: .3; cursor: default; }
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }
.lightbox-counter { text-align: center; color: var(--muted); margin-top: 6px; font-size: .8rem; }

@media (max-width: 640px) {
  .lightbox-nav { width: 40px; height: 40px; font-size: 1.2rem; }
  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }
}

/* ---------- Admin ---------- */
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 0; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.admin-topbar h1 { margin: 0; font-size: 1.3rem; }
.admin-topbar .sub { margin: 2px 0 0; color: var(--muted); font-size: .85rem; }
.admin-topbar-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: .85rem; }
.admin-topbar-right a { color: var(--muted); text-decoration: none; font-weight: 700; }
.admin-topbar-right a:hover { color: var(--gold); }

.admin-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-bottom: 30px; }
.admin-tile { display: block; text-decoration: none; color: inherit; }

.btn.danger { background: rgba(224,90,90,.14); color: #f08a8a; border: 1px solid rgba(224,90,90,.4); }
.btn.danger:hover { background: rgba(224,90,90,.25); }
.btn.small { padding: 8px 14px; font-size: .82rem; }

.row-actions { display: flex; gap: 10px; align-items: center; }

.tag { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.tag.on { background: rgba(90,200,120,.14); border-color: rgba(90,200,120,.4); color: #6fd98c; }
.tag.off { background: rgba(224,90,90,.1); border-color: rgba(224,90,90,.35); color: #f08a8a; }

.admin-form label { display: block; text-align: left; font-weight: 700; font-size: .85rem; margin: 12px 0 4px; }
.admin-form input[type=text], .admin-form input[type=email], .admin-form input[type=file], .admin-form textarea,
.admin-form select, .admin-form input[type=number], .admin-form input[type=date], .admin-form input[type=password] {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-size: .92rem; font-family: inherit;
}
.admin-form textarea { resize: vertical; }
.admin-form input:focus, .admin-form textarea:focus, .admin-form select:focus { outline: none; border-color: var(--gold); }
.admin-form input[type=checkbox] { width: auto; margin-right: 6px; vertical-align: middle; }
.admin-form .hint { color: var(--muted); font-size: .78rem; margin: 4px 0 0; }

.admin-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.admin-table th, .admin-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table th { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
.admin-table tbody tr:hover { background: var(--panel-2); }
.admin-table .thumb-sm { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }

.admin-item { display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.admin-item:last-child { border-bottom: none; }
.admin-item .thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--panel-2); flex-shrink: 0; }
.admin-item .body { flex: 1; min-width: 0; }
.admin-item .body h3 { margin: 0 0 4px; font-size: .98rem; }
.admin-item .body p { margin: 0; color: var(--muted); font-size: .85rem; }
.admin-item form { display: inline; }

@media (max-width: 760px) {
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #14161b; border-bottom: 1px solid var(--line); flex-direction: column; padding: 8px; }
  .site-nav.open { display: flex; }
  .nav-toggle { display: inline-block; }
}

/* ---------- Login (thème Scoring Pro : fond noir + particules dorées + silhouette Bonne-Mère) ---------- */
.login-wrap{position:relative;overflow:hidden;background-color:#000;background-image:radial-gradient(circle at top,#2a2a2a 0%,#141414 55%,#000000 100%)}
.login-wrap::before{content:"";position:absolute;bottom:-40px;right:-30px;width:300px;height:880px;background-image:url('../img/bonne-mere.png');background-size:contain;background-repeat:no-repeat;background-position:bottom right;opacity:.28;pointer-events:none;z-index:0;filter:drop-shadow(0 0 30px rgba(240,209,32,.12))}
.login-wrap .login-card{position:relative;z-index:1;background:rgba(25,28,34,.82);backdrop-filter:blur(22px)}
#gold-particles{position:fixed;inset:0;z-index:0;pointer-events:none}
@media(max-width:600px){.login-wrap::before{width:170px;height:500px;opacity:.2}}
.login-card .password-field{position:relative}
.login-card .password-field input{padding-right:44px}
.login-card .toggle-password{position:absolute;right:6px;top:50%;transform:translateY(-50%);background:transparent;border:none;padding:6px 8px;cursor:pointer;font-size:18px;line-height:1;color:var(--muted);border-radius:8px}
.login-card .toggle-password:hover,.login-card .toggle-password:focus-visible{background:rgba(255,255,255,.08)}
.login-forgot{text-align:right;margin-top:4px}
.login-forgot a{color:var(--gold);font-size:.82rem;font-weight:700;text-decoration:none}
.login-forgot a:hover{text-decoration:underline}
