/* =========================================================
   ABRACADABOUX — Association de parents d'élèves
   Ton : chaleureux, humain, digne de confiance. Pour des PARENTS.
   Display : Bricolage Grotesque · Corps : Figtree
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,600;12..96,700&family=Figtree:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --fond:        #faf8f4;
  --carte:       #ffffff;
  --encre:       #223040;
  --encre-doux:  #5d6b7a;
  --petrole:     #2c6274;
  --petrole-fonce:#1f4a58;
  --petrole-clair:#e3edf0;
  --ambre:       #cf862f;
  --ambre-clair: #f6e9d6;
  --sauge:       #6f9d76;
  --sauge-clair: #e6f0e6;
  --bordure:     #ece6dc;

  --rayon:       14px;
  --rayon-sm:    10px;
  --ombre:       0 16px 44px -22px rgba(31, 74, 88, .40);
  --ombre-douce: 0 8px 24px -14px rgba(31, 74, 88, .28);
  --large:       1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Figtree', system-ui, sans-serif;
  color: var(--encre);
  background: var(--fond);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 .5em;
  color: var(--encre);
  letter-spacing: -.015em;
}

a { color: var(--petrole); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--large); margin: 0 auto; padding: 0 24px; }

/* ---------- En-tête / navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(250, 248, 244, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--bordure);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 74px; }
.brand {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.3rem;
  color: var(--encre); text-decoration: none; letter-spacing: -.02em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: linear-gradient(150deg, var(--petrole), var(--petrole-fonce));
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: .95rem;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.12);
}
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  padding: 8px 14px; border-radius: 8px; color: var(--encre-doux);
  font-weight: 600; font-size: .96rem;
}
.nav-links a:hover { background: var(--petrole-clair); color: var(--petrole); text-decoration: none; }
.nav-links a.nav-cta { color: var(--petrole); }
.nav-toggle { display: none; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 10px; border: none;
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; font-size: 1rem;
  cursor: pointer; background: var(--petrole); color: #fff;
  box-shadow: 0 8px 18px -10px rgba(44, 98, 116, .8);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; background: var(--petrole-fonce); }
.btn-amber { background: var(--ambre); box-shadow: 0 8px 18px -10px rgba(207, 134, 47, .85); }
.btn-amber:hover { background: #b9741f; }
.btn-outline { background: transparent; color: var(--petrole); box-shadow: none; border: 1.5px solid #cdd9dd; }
.btn-outline:hover { background: var(--petrole-clair); color: var(--petrole-fonce); }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Hero (clair, posé) ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(680px 320px at 88% -8%, var(--ambre-clair), transparent 70%),
    radial-gradient(760px 380px at 6% 108%, var(--petrole-clair), transparent 72%),
    var(--fond);
  padding: 92px 0 84px; text-align: center;
}
.hero-eyebrow {
  display: inline-block; font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 600; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--petrole); background: #fff;
  border: 1px solid var(--bordure); padding: 7px 16px; border-radius: 999px; margin-bottom: 24px;
}
.hero h1 {
  font-weight: 700; font-size: clamp(2.6rem, 7vw, 4.4rem);
  margin: 0 0 .3em; max-width: 14ch; margin-inline: auto;
}
.hero h1 em { font-style: normal; color: var(--ambre); }
.hero .lead {
  max-width: 600px; margin: 0 auto 34px;
  font-size: clamp(1.05rem, 2.3vw, 1.25rem); color: var(--encre-doux);
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Chiffres ---------- */
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  margin: 44px auto 0; max-width: 820px;
}
.stat {
  background: var(--carte); border: 1px solid var(--bordure); border-radius: var(--rayon);
  padding: 24px 18px; text-align: center; box-shadow: var(--ombre-douce);
}
.stat .num { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 2.15rem; color: var(--petrole); line-height: 1; }
.stat .lbl { font-size: .92rem; color: var(--encre-doux); font-weight: 600; margin-top: 4px; }

/* ---------- Sections ---------- */
.section { padding: 76px 0; }
.section-head { max-width: 640px; margin: 0 auto 46px; text-align: center; }
.eyebrow {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; font-size: .8rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ambre); margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.section-head p { color: var(--encre-doux); }
.section-alt { background: #f4efe7; }

/* ---------- Cartes ---------- */
.card { background: var(--carte); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 28px; box-shadow: var(--ombre-douce); }
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.event-card { display: flex; flex-direction: column; }
.event-date {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 58px; height: 58px; border-radius: 12px;
  background: var(--petrole-clair); color: var(--petrole-fonce); margin-bottom: 18px; flex: none;
  border: 1px solid #d3e1e5;
}
.event-date .d { font-family: 'Bricolage Grotesque'; font-weight: 700; font-size: 1.35rem; line-height: 1; }
.event-date .m { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.event-card h3 { font-size: 1.22rem; margin-bottom: .3em; }
.event-card p { color: var(--encre-doux); font-size: .98rem; margin-bottom: 1.1em; }
.event-card .tag {
  display: inline-block; font-size: .76rem; font-weight: 700; color: var(--sauge);
  background: var(--sauge-clair); padding: 4px 12px; border-radius: 999px; margin-bottom: 14px; align-self: flex-start;
}

/* Features (qui sommes-nous) */
.feature { text-align: left; }
.feature .ico {
  width: 52px; height: 52px; display: grid; place-items: center; margin: 0 0 18px; border-radius: 12px;
}
.feature .ico svg { width: 26px; height: 26px; }
.ico-petrole { background: var(--petrole-clair); color: var(--petrole); }
.ico-ambre { background: var(--ambre-clair); color: var(--ambre); }
.ico-sauge { background: var(--sauge-clair); color: var(--sauge); }
.feature h3 { font-size: 1.2rem; }
.feature p { color: var(--encre-doux); font-size: .98rem; margin-bottom: 0; }

/* ---------- Encart bénévoles ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--petrole), var(--petrole-fonce));
  border-radius: var(--rayon); padding: 50px 40px; color: #fff; text-align: center; box-shadow: var(--ombre);
}
.cta-band h2 { color: #fff; font-size: clamp(1.7rem, 4vw, 2.25rem); }
.cta-band p { color: rgba(255,255,255,.9); max-width: 540px; margin: 0 auto 26px; }
.cta-band .btn { background: var(--ambre); color: #fff; box-shadow: 0 10px 24px -12px rgba(0,0,0,.4); }
.cta-band .btn:hover { background: #b9741f; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.contact-info { padding: 0; margin: 0; }
.contact-info li { list-style: none; display: flex; gap: 14px; align-items: flex-start; margin: 0 0 20px; }
.contact-info li:last-child { margin-bottom: 0; }
.contact-info .k { flex: none; width: 42px; height: 42px; border-radius: 10px; background: var(--petrole-clair); color: var(--petrole); display: grid; place-items: center; }
.contact-info .k svg { width: 20px; height: 20px; }
.contact-info strong { display: block; }
.contact-info span.v { color: var(--encre-doux); font-size: .96rem; }

/* ---------- Formulaires (partagé avec inscription.php) ---------- */
.form label { display: block; font-weight: 600; margin-bottom: 16px; color: var(--encre); font-size: .96rem; }
.form input, .form textarea, .form select {
  width: 100%; margin-top: 6px; padding: 12px 14px;
  border: 1.5px solid var(--bordure); border-radius: var(--rayon-sm);
  font: inherit; font-weight: 400; color: var(--encre); background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none; border-color: var(--petrole); box-shadow: 0 0 0 4px rgba(44,98,116,.13);
}

/* ---------- Alerte (partagé) ---------- */
.alert { background: #fbeee2; border: 1.5px solid var(--ambre); color: #9c5f1c; padding: 14px 18px; border-radius: var(--rayon-sm); margin-bottom: 22px; font-weight: 600; }
.alert-ok { background: var(--sauge-clair); border-color: var(--sauge); color: #3f6a48; }

/* ---------- Badges & créneaux (partagé avec inscription.php) ---------- */
.badge { display: inline-block; background: var(--sauge-clair); color: #3f6a48; font-weight: 700; font-size: .82rem; padding: 5px 12px; border-radius: 999px; }
.badge.full { background: #f6e2e2; color: #a4453f; }
.empty { color: var(--encre-doux); font-style: italic; }
.stand-list { display: grid; gap: 22px; }
.stand-group { border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 22px; background: #fff; }
.stand-group-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.stand-group-head h4 { margin: 0; font-size: 1.15rem; }
.stand-group-head p { margin: 0; color: var(--encre-doux); font-size: .9rem; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.slot-card { display: flex; flex-direction: column; gap: 8px; border: 1.5px solid var(--bordure); border-radius: var(--rayon-sm); padding: 14px; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.slot-card:hover { border-color: var(--petrole); background: var(--petrole-clair); }
.slot-card input { accent-color: var(--petrole); }
.slot-time { font-weight: 700; }
.slot-disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--petrole-fonce); color: #cADbe0; padding: 50px 0 28px; margin-top: 20px; }
.footer-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; margin-bottom: 30px; }
.site-footer .brand { color: #fff; }
.site-footer .brand-mark { background: rgba(255,255,255,.14); }
.site-footer a { color: #bcd2d8; }
.site-footer a:hover { color: #fff; }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 12px; }
.footer-col a { display: block; margin-bottom: 8px; font-size: .95rem; }
.footer-col p { color: #a7c0c7; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); padding-top: 20px; font-size: .88rem; color: #9fb8bf; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid-3, .grid-2, .contact-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .nav-links { display: none; position: absolute; top: 74px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--fond); border-bottom: 1px solid var(--bordure); padding: 12px 24px; gap: 4px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: inline-grid; place-items: center; width: 44px; height: 44px; border: none; background: none; font-size: 1.5rem; color: var(--encre); cursor: pointer; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn:hover { transform: none; } }

/* ===================== PAGES INTERNES ===================== */
.page-hero {
  background: radial-gradient(560px 240px at 85% -25%, var(--ambre-clair), transparent 70%), var(--petrole-clair);
  padding: 64px 0 56px; text-align: center; border-bottom: 1px solid var(--bordure);
}
.page-hero .eyebrow { color: var(--petrole); }
.page-hero h1 { font-size: clamp(2.1rem, 5vw, 3rem); margin-bottom: .2em; }
.page-hero p { color: var(--encre-doux); max-width: 620px; margin: 0 auto; }

.prose { max-width: 720px; margin: 0 auto; }
.prose h2 { margin: 1.6em 0 .5em; font-size: 1.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--encre); }
.prose ul { padding-left: 1.2em; color: var(--encre); }
.prose li { margin-bottom: .4em; }

/* Le bureau */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 20px; }
.member { text-align: center; }
.member .avatar {
  width: 74px; height: 74px; border-radius: 50%; margin: 0 auto 14px;
  display: grid; place-items: center; font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700; font-size: 1.5rem; color: #fff;
  background: linear-gradient(150deg, var(--petrole), var(--petrole-fonce));
}
.member .avatar.a2 { background: linear-gradient(150deg, var(--ambre), #b9741f); }
.member .avatar.a3 { background: linear-gradient(150deg, var(--sauge), #4f7a56); }
.member .avatar.a4 { background: linear-gradient(150deg, #5a6b8c, #3a4763); }
.member h3 { font-size: 1.1rem; margin-bottom: .1em; }
.member .role { color: var(--petrole); font-weight: 600; font-size: .92rem; }
.member p { color: var(--encre-doux); font-size: .92rem; margin: .5em 0 0; }

/* Actualités */
.article-list { display: grid; gap: 26px; max-width: 760px; margin: 0 auto; }
.article { display: grid; grid-template-columns: 128px 1fr; gap: 24px; align-items: start; }
.article .thumb {
  border-radius: 12px; aspect-ratio: 1 / 1; display: grid; place-items: center;
  background: var(--petrole-clair); color: var(--petrole); text-align: center; padding: 10px;
}
.article .thumb.t2 { background: var(--ambre-clair); color: var(--ambre); }
.article .thumb.t3 { background: var(--sauge-clair); color: #4f7a56; }
.article .thumb .dd { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.9rem; line-height: 1; }
.article .thumb .mm { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.article-meta { font-size: .8rem; color: var(--ambre); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.article h3 { font-size: 1.3rem; margin-bottom: .3em; }
.article p { color: var(--encre-doux); margin-bottom: 0; }
@media (max-width: 620px) {
  .article { grid-template-columns: 1fr; }
  .article .thumb { max-width: 96px; }
}

/* ===================== PHOTOS ===================== */
/* Hero en deux colonnes (texte + photo) */
.hero { text-align: left; }
.hero-grid { display: grid; grid-template-columns: 1.04fr .96fr; gap: 46px; align-items: center; }
.hero-grid h1 { margin-inline: 0; max-width: none; }
.hero-grid .lead { margin-left: 0; margin-right: 0; }
.hero-actions { justify-content: flex-start; }
.hero .stats { margin-top: 42px; }
@media (max-width: 860px) {
  .hero { text-align: center; }
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-actions { justify-content: center; }
  .hero-grid .lead { margin-inline: auto; }
}

/* Cadre photo générique + repli quand l'image manque */
.photo { position: relative; border-radius: 16px; overflow: hidden; background: var(--petrole-clair); box-shadow: var(--ombre); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-ph { box-shadow: none; background: linear-gradient(135deg, var(--petrole-clair), var(--ambre-clair)); border: 1.5px dashed #cbb489; display: grid; place-items: center; }
.photo-ph-in { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; color: var(--petrole); font-weight: 600; font-size: .88rem; text-align: center; padding: 12px; }
.photo-ph-in svg { width: 30px; height: 30px; opacity: .75; }
.hero-photo { aspect-ratio: 4 / 3; }

/* Cartes événements avec image en tête */
.event-card { padding: 0; overflow: hidden; }
.event-card .photo { border-radius: 0; box-shadow: none; }
.event-photo { aspect-ratio: 16 / 10; }
.event-date {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  width: auto; min-width: 50px; height: auto; padding: 7px 11px; border-radius: 10px;
  background: rgba(255,255,255,.95); color: var(--petrole-fonce); border: none;
  box-shadow: 0 6px 14px -8px rgba(0,0,0,.45); margin: 0;
}
.event-body { padding: 22px; display: flex; flex-direction: column; }

/* Article avec photo (remplace la vignette datée si une image est fournie) */
.article .photo { aspect-ratio: 1 / 1; border-radius: 12px; box-shadow: none; }

.event-card { position: relative; }

/* ===================== ESPACE ADMIN ===================== */
.admin-bar { background: var(--petrole-fonce); color: #fff; }
.admin-bar .container { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.admin-bar .brand { color: #fff; font-size: 1.1rem; }
.admin-bar .brand-mark { background: rgba(255,255,255,.16); }
.admin-bar a { color: #cfe0e5; font-weight: 600; text-decoration: none; }
.admin-bar a:hover { color: #fff; }
.admin-actions { display: flex; gap: 20px; align-items: center; font-size: .95rem; }
.admin-main { padding: 40px 0 80px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.admin-head h1 { margin: 0; font-size: 1.8rem; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--bordure); border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre-douce); }
.admin-table th, .admin-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--bordure); font-size: .95rem; vertical-align: middle; }
.admin-table th { background: #f4efe7; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; color: var(--encre); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .actions { display: flex; gap: 8px; }
.btn-sm { padding: 7px 14px; font-size: .88rem; border-radius: 8px; }
.btn-danger { background: #c0492f; box-shadow: none; }
.btn-danger:hover { background: #a23c26; }
.pill { display: inline-block; font-size: .76rem; font-weight: 700; padding: 4px 11px; border-radius: 999px; }
.pill-on { background: var(--sauge-clair); color: #3f6a48; }
.pill-off { background: #ece4d7; color: #8a7f6d; }
.admin-card { max-width: 620px; }
.login-wrap { max-width: 410px; margin: 70px auto; }
.form .check { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-top: 4px; }
.form .check input { width: auto; margin: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) {
  .field-row { grid-template-columns: 1fr; }
  .admin-table { display: block; overflow-x: auto; }
  .admin-head { flex-direction: column; align-items: flex-start; }
}

/* Champ photo dans l'admin */
.current-photo { display: flex; align-items: center; gap: 12px; margin: 8px 0 10px; font-weight: 400; font-size: .92rem; color: var(--encre-doux); }
.current-photo img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--bordure); }
.form input[type="file"] { padding: 9px 12px; background: #fbfaf7; cursor: pointer; }
.hint { display: block; margin-top: 6px; font-size: .82rem; font-weight: 400; color: var(--encre-doux); }

/* ===================== FINITIONS & ANIMATIONS ===================== */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
.card { transition: box-shadow .22s ease; }
.feature:hover, .event-card:hover { box-shadow: var(--ombre); }

/* ===================== GALERIE ===================== */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery-item { position: relative; margin: 0; border-radius: 12px; overflow: hidden; box-shadow: var(--ombre-douce); aspect-ratio: 4 / 3; background: var(--petrole-clair); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 10px; background: linear-gradient(transparent, rgba(31,74,88,.82)); color: #fff; font-size: .9rem; font-weight: 600; }
@media (max-width: 760px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .gallery-grid { grid-template-columns: 1fr; } }

/* Nav admin */
.admin-nav { display: flex; gap: 6px; }
.admin-nav a { padding: 7px 13px; border-radius: 8px; color: #cfe0e5; font-weight: 600; font-size: .92rem; }
.admin-nav a:hover, .admin-nav a.on { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }

/* Réseaux sociaux (footer) */
.social-link { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.12); color: #fff; margin-top: 14px; transition: background .2s ease; }
.social-link:hover { background: rgba(255,255,255,.22); text-decoration: none; }
.social-link svg { width: 20px; height: 20px; }
