/* ============================================================
   PAGE HOME (/)
   Landing page "Soleil à Madzari" — hero + liste des lotos + contact
   Mobile-first : base mobile, @media pour ≥ 821px (tablette/desktop)
   Préfixe `hr-` pour isoler ce thème du reste du site.
   Les variables, navbar, footer, boutons, countdown, flash et badges
   sont définis dans `hr-shared.css` (à charger AVANT ce fichier).
   ============================================================ */

/* ── HERO ──────────────────────────────────── */
.hr-hero {
    position: relative; min-height: 85vh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 110px 1rem 60px; overflow: hidden;
}
.hr-glow { position: absolute; border-radius: 50%; pointer-events: none; }
.hr-glow--gold { top: 20%; left: 50%; transform: translate(-50%, -50%); width: min(600px, 90vw); height: min(400px, 60vw); background: oklch(0.78 0.16 85 / 0.18); filter: blur(80px); }
.hr-glow--blue { top: 60%; left: 15%; width: min(320px, 60vw); height: min(320px, 60vw); background: oklch(0.6 0.18 260 / 0.1); filter: blur(70px); }
.hr-glow--red { top: 40%; right: 10%; width: min(280px, 55vw); height: min(280px, 55vw); background: oklch(0.65 0.18 25 / 0.08); filter: blur(70px); }

.hr-balls { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hr-ball {
    position: absolute; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: #fff; font-family: 'DM Sans', sans-serif;
    text-shadow: 0 1px 3px rgba(0,0,0,0.45);
    will-change: transform, opacity;
}
@keyframes hr-floatBall {
    0%, 100% { transform: translate(0,0) rotate(0deg); opacity: 0.85; }
    25% { transform: translate(15px,-20px) rotate(90deg); opacity: 1; }
    50% { transform: translate(-10px,15px) rotate(180deg); opacity: 0.9; }
    75% { transform: translate(20px,8px) rotate(270deg); opacity: 1; }
}
@keyframes hr-heroIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes hr-bounce { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(6px); } }

.hr-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 760px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    animation: hr-heroIn 0.8s ease both;
}
.hr-hero-img {
    display: block; max-width: 360px; width: 100%; height: auto;
    margin: 0 auto 24px; border-radius: 16px;
    box-shadow: 0 20px 60px oklch(0.18 0.015 265 / 0.18);
}
.hr-scope .hr-title {
    font-size: clamp(2.5rem, 8vw, 6rem);
    font-weight: 900; line-height: 0.95; margin-bottom: 2.5rem; letter-spacing: -1px;
    text-align: center;
}
.hr-title span { display: block; }
.hr-title .hr-accent {
    background: linear-gradient(135deg, var(--gold), var(--gold-bright) 60%, oklch(0.82 0.13 70));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.hr-lead {
    font-size: clamp(1rem, 2.4vw, 1.375rem);
    color: var(--text);
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    font-weight: 500;
    text-align: center;
    padding: 0 1rem;
}

@media (min-width: 821px) {
    .hr-lead {
        max-width: 720px;
        padding: 0;
    }
}
.hr-lead strong { color: var(--gold-dim); font-weight: 700; }
.hr-cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.hr-next-card {
    margin-top: 2rem; display: inline-flex; align-items: center; gap: 12px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
    padding: 14px 16px; flex-wrap: wrap; justify-content: center;
}
.hr-next-card-sep { display: none; width: 1px; height: 50px; background: var(--border); }
.hr-next-card-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.hr-next-card-title { font-family: 'Playfair Display', serif; font-size: 17px; font-weight: 700; color: var(--gold); margin-top: 2px; }
.hr-next-card-meta { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

.hr-scroll-hint {
    position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    animation: hr-bounce 2s ease-in-out infinite; opacity: 0.4;
    font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.5px;
}

@media (min-width: 561px) {
    .hr-hero { padding: 120px 1.5rem 80px; min-height: 92vh; }
    .hr-hero-img { max-width: 560px; margin-bottom: 32px; }
    .hr-next-card { margin-top: 48px; padding: 16px 24px; gap: 16px; }
    .hr-next-card-sep { display: block; }
}

/* ── STATS ─────────────────────────────────── */
.hr-stats { padding: 0 1rem 2.5rem; max-width: 1100px; margin: 0 auto; position: relative; z-index: 3; }
.hr-stats-grid {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
    padding: 20px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
.hr-stat { text-align: center; padding: 8px 0; border-right: 1px solid var(--border); }
.hr-stat:last-child { border-right: none; }
.hr-stat-val { font-family: 'Playfair Display', serif; font-size: clamp(1.5rem, 4vw, 1.875rem); font-weight: 900; color: var(--gold); }
.hr-stat-lbl { font-size: 12px; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.8px; }

.hr-stats-grid .hr-stat:nth-child(odd) { border-right: 1px solid var(--border); }
.hr-stats-grid .hr-stat:nth-child(even) { border-right: none; }
.hr-stats-grid .hr-stat:nth-child(-n+2) { border-bottom: 1px solid var(--border); padding-bottom: 16px; }
.hr-stats-grid .hr-stat:nth-child(n+3) { padding-top: 16px; }

@media (min-width: 721px) {
    .hr-stats { padding: 0 2rem 60px; }
    .hr-stats-grid { grid-template-columns: repeat(4, 1fr); padding: 24px 40px; }
    .hr-stats-grid .hr-stat:nth-child(-n+2) { border-bottom: none; padding-bottom: 8px; }
    .hr-stats-grid .hr-stat:nth-child(n+3) { padding-top: 8px; }
    .hr-stats-grid .hr-stat:nth-child(even) { border-right: 1px solid var(--border); }
    .hr-stats-grid .hr-stat:last-child { border-right: none; }
}

/* ── EVENTS ─────────────────────────────────── */
.hr-events { padding: 20px 1rem 60px; max-width: 1200px; margin: 0 auto; }
.hr-section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 2rem; flex-wrap: wrap; gap: 16px; }
.hr-tabs { display: flex; gap: 6px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 4px; }
.hr-tab {
    padding: 6px 16px; border-radius: 7px; font-size: 13px; font-weight: 500;
    cursor: pointer; transition: all 0.2s; border: none;
    background: transparent; color: var(--text-muted); font-family: inherit;
    min-height: 36px;
}
.hr-tab.active { background: var(--gold); color: #1a1200; }

.hr-events-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 561px) {
    .hr-events-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        justify-content: center;
    }
}
@media (min-width: 821px) {
    .hr-events { padding: 20px 2rem 80px; }
    .hr-events-grid {
        grid-template-columns: repeat(auto-fit, minmax(340px, 380px));
    }
    .hr-section-head { margin-bottom: 64px; }
}

.hr-event-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
    overflow: hidden; transition: transform 0.2s, box-shadow 0.2s;
    position: relative; display: flex; flex-direction: column;
}
.hr-event-card.is-featured { border-color: var(--gold-dim); box-shadow: 0 0 40px oklch(0.78 0.14 85 / 0.15); }
.hr-event-card.is-ended { opacity: 0.65; }
.hr-event-card:not(.is-ended):hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.hr-event-card.is-featured:not(.is-ended):hover { box-shadow: 0 10px 40px oklch(0.78 0.14 85 / 0.25); }
.hr-event-card.is-featured::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.hr-event-head { padding: 24px 24px 18px; border-bottom: 1px solid var(--border); }
.hr-event-head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.hr-tag-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.hr-tag { padding: 2px 9px; border-radius: 99px; font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.hr-tag--featured { background: linear-gradient(135deg, var(--gold), var(--gold-bright)); color: #1a1200; }
.hr-tag--ended { background: oklch(0.85 0.005 265); color: oklch(0.45 0.01 265); }
.hr-event-title {
    font-size: clamp(1.25rem, 2.6vw, 1.75rem); font-weight: 900; color: #dc2626;
    line-height: 1.15; text-transform: uppercase; margin-top: 12px;
    width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hr-event-card.is-featured .hr-event-title { font-size: clamp(1.375rem, 2.8vw, 2rem); }
.hr-event-card.is-ended .hr-event-title { color: var(--text-muted); }
.hr-event-subtitle { color: var(--text); font-size: 15px; margin-top: 14px; line-height: 1.55; white-space: pre-line; width: 100%; }

.hr-event-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; }
.hr-event-meta-item { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); }
.hr-event-meta-item strong { font-weight: 500; color: var(--text); }
.hr-event-meta--date .hr-event-meta-item { font-size: clamp(1rem, 2vw, 1.125rem); }
.hr-event-meta--date .hr-event-meta-item strong { font-weight: 800; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.hr-event-meta-item svg { flex-shrink: 0; }

.hr-event-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.hr-block-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }

.hr-places-bar-head { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 12px; color: var(--text-muted); }
.hr-places-bar-head strong { font-weight: 600; }
.hr-places-bar-track { height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; }
.hr-places-bar-fill { height: 100%; border-radius: 99px; transition: width 0.6s ease; }
.hr-places-bar-fill--ok { background: var(--green); }
.hr-places-bar-fill--warn { background: oklch(0.72 0.15 55); }
.hr-places-bar-fill--full { background: var(--red); }

.hr-mini-boxes { display: flex; gap: 10px; flex-direction: column; }
@media (min-width: 561px) {
    .hr-mini-boxes { flex-direction: row; flex-wrap: wrap; }
}
.hr-mini-box {
    flex: 1; min-width: 110px; background: var(--bg-soft); border-radius: 10px;
    padding: 10px 14px; border: 1px solid var(--border);
}
.hr-mini-box.is-accent { flex: 2; border-color: oklch(0.78 0.14 85 / 0.35); }
.hr-mini-box-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 2px; }
.hr-mini-box-val { font-size: 20px; font-weight: 700; color: var(--gold); font-family: 'Playfair Display', serif; }
.hr-mini-box-val--free { color: var(--green); }
.hr-mini-box-txt { font-size: 14px; font-weight: 600; color: var(--gold-dim); }
.hr-mini-box-small { font-size: 12px; color: var(--gold-dim); margin-top: 2px; }

.hr-expand-btn {
    width: 100%; cursor: pointer; font-family: inherit; min-height: 48px;
    padding: 12px 16px; border-radius: 12px;
    background: linear-gradient(135deg, oklch(0.78 0.14 85 / 0.14), oklch(0.78 0.14 85 / 0.04));
    border: 1px solid oklch(0.78 0.14 85 / 0.45);
    color: var(--gold-dim);
    font-size: 14px; font-weight: 700;
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease, color 0.2s;
    box-shadow: 0 1px 0 oklch(0.78 0.14 85 / 0.12);
}
.hr-expand-btn:hover {
    background: linear-gradient(135deg, oklch(0.78 0.14 85 / 0.24), oklch(0.78 0.14 85 / 0.1));
    border-color: var(--gold);
    color: var(--text);
    transform: translateY(-1px);
    box-shadow: 0 6px 22px oklch(0.78 0.14 85 / 0.28);
}
.hr-expand-btn[aria-expanded="true"] {
    border-color: var(--gold);
    background: linear-gradient(135deg, oklch(0.78 0.14 85 / 0.18), oklch(0.78 0.14 85 / 0.06));
    color: var(--text);
}
.hr-expand-btn-label {
    display: inline-flex; align-items: center; gap: 10px;
    flex: 1; min-width: 0;
}
.hr-expand-btn-icon { color: var(--gold); flex-shrink: 0; }
.hr-expand-btn-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 26px; height: 22px; padding: 0 8px;
    border-radius: 99px;
    background: linear-gradient(135deg, var(--gold), var(--gold-bright));
    color: #1a1200;
    font-size: 11px; font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px oklch(0.78 0.14 85 / 0.35);
}
.hr-expand-btn-chevron { transition: transform 0.25s ease; flex-shrink: 0; color: var(--gold-dim); }
.hr-expand-btn[aria-expanded="true"] .hr-expand-btn-chevron { transform: rotate(180deg); color: var(--gold); }
.hr-expand-panel { display: none; margin-top: 10px; background: var(--bg-soft); border-radius: 10px; padding: 14px; border: 1px solid var(--border); }
.hr-expand-panel.open { display: block; }
.hr-expand-title { font-size: 11px; color: var(--gold-dim); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; font-weight: 600; }
.hr-special-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.hr-special-row:last-child { border-bottom: none; }
.hr-special-name { color: var(--text); }
.hr-special-value { font-weight: 600; color: var(--gold); }
.hr-special-block {
    background: oklch(0.78 0.14 85 / 0.08);
    border: 1px solid oklch(0.78 0.14 85 / 0.3);
    border-radius: 12px; padding: 14px 16px;
}
.hr-special-block .hr-block-label {
    color: var(--gold-dim); font-weight: 700;
    display: flex; align-items: center; gap: 6px; margin-bottom: 10px;
}
.hr-special-block .hr-special-row { border-bottom-color: oklch(0.78 0.14 85 / 0.2); font-size: 14px; }
.hr-chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.hr-chip { background: var(--border); color: var(--text-muted); padding: 3px 10px; border-radius: 99px; font-size: 12px; }

.hr-event-foot { padding: 0 24px 24px; }
.hr-event-info { font-size: 11px; color: var(--text-muted); margin-bottom: 12px; line-height: 1.5; }

/* ── CONTACT ──────────────────────────────── */
.hr-contact {
    padding: 60px 1.25rem; background: var(--bg-card); border-top: 1px solid var(--border);
}
.hr-contact-grid { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 2.5rem; align-items: stretch; }
.hr-contact-left { display: flex; flex-direction: column; gap: 24px; }
.hr-contact-channels { display: flex; flex-direction: column; gap: 14px; }
.hr-contact-channel {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
    text-decoration: none; color: inherit; transition: border-color 0.2s;
    min-height: 64px;
}
.hr-contact-channel:hover { border-color: var(--gold-dim); }
.hr-contact-channel-icon { font-size: 22px; }
.hr-contact-channel-lbl { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.hr-contact-channel-val { font-size: 14px; font-weight: 600; color: var(--gold); margin-top: 2px; }

.hr-contact-card {
    background: var(--bg); border: 1px solid var(--border); border-radius: 16px; padding: clamp(1.25rem, 4vw, 2rem);
}
.hr-contact-card form { display: flex; flex-direction: column; gap: 14px; }
.hr-contact-card label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; display: block; margin-bottom: 6px; }
.hr-contact-card input, .hr-contact-card textarea, .hr-contact-card select {
    width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
    padding: 12px 14px; color: var(--text); font-size: 16px; font-family: inherit; outline: none;
    transition: border-color 0.2s;
    min-height: 44px;
}
.hr-contact-card textarea { resize: vertical; min-height: 120px; }
.hr-contact-card input:focus, .hr-contact-card textarea:focus, .hr-contact-card select:focus { border-color: var(--gold-dim); }
.hr-contact-card .form-text { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.hr-contact-card .invalid-feedback { color: var(--red); font-size: 12px; margin-top: 4px; display: block; }
.hr-contact-card button[type="submit"], .hr-contact-card .btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-bright));
    border: none; color: #1a1200; padding: 14px 24px; border-radius: 10px;
    font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; transition: opacity 0.2s;
    margin-top: 4px;
    min-height: 48px;
}
.hr-contact-card button[type="submit"]:hover { opacity: 0.9; }
.hr-honeypot { display: none !important; }

/* ── BOULES ANIMÉES ────────────────────────────────── */
.hr-boulier-balls {
    position: relative;
    width: clamp(220px, 60vw, 300px);
    aspect-ratio: 1;
    margin: 1.25rem auto 0;
    pointer-events: none;
}

.hr-bb {
    position: absolute;
    top: 50%; left: 50%;
    width: 26%;
    aspect-ratio: 1;
    margin-left: -13%;
    margin-top: -13%;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(9px, 1.7vw, 13px);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    box-shadow:
        inset -2px -3px 5px rgba(0, 0, 0, 0.3),
        inset 2px 2px 4px rgba(255, 255, 255, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.25);
    will-change: transform;
}
.hr-bb--red    { background: radial-gradient(circle at 32% 30%, #ff6b6b, #c0392b); }
.hr-bb--blue   { background: radial-gradient(circle at 32% 30%, #5dade2, #1f618d); }
.hr-bb--green  { background: radial-gradient(circle at 32% 30%, #58d68d, #1e8449); }
.hr-bb--orange { background: radial-gradient(circle at 32% 30%, #f5b041, #b9770e); }
.hr-bb--purple { background: radial-gradient(circle at 32% 30%, #bb8fce, #6c3483); }
.hr-bb--yellow {
    background: radial-gradient(circle at 32% 30%, #f7dc6f, #b7950b);
    color: #3a2800;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

.hr-bb:nth-child(1) { animation: hr-bb-1 2.6s ease-in-out infinite; }
.hr-bb:nth-child(2) { animation: hr-bb-2 2.9s ease-in-out infinite; animation-delay: -0.4s; }
.hr-bb:nth-child(3) { animation: hr-bb-3 3.2s ease-in-out infinite; animation-delay: -0.9s; }
.hr-bb:nth-child(4) { animation: hr-bb-4 2.7s ease-in-out infinite; animation-delay: -1.3s; }
.hr-bb:nth-child(5) { animation: hr-bb-5 3.1s ease-in-out infinite; animation-delay: -1.7s; }
.hr-bb:nth-child(6) { animation: hr-bb-6 2.8s ease-in-out infinite; animation-delay: -2.1s; }

/* Parcours des boules : restent dans le cercle inscrit.
   Les translate(%) sont relatifs à la taille de la boule ;
   ±150 % ≈ bord intérieur de la cage. */
@keyframes hr-bb-1 {
    0%, 100% { transform: translate(60%, -70%); }
    33%      { transform: translate(110%, 30%); }
    66%      { transform: translate(-30%, 100%); }
}
@keyframes hr-bb-2 {
    0%, 100% { transform: translate(-80%, -50%); }
    33%      { transform: translate(-100%, 40%); }
    66%      { transform: translate(20%, 110%); }
}
@keyframes hr-bb-3 {
    0%, 100% { transform: translate(90%, 60%); }
    33%      { transform: translate(-20%, 100%); }
    66%      { transform: translate(-100%, -20%); }
}
@keyframes hr-bb-4 {
    0%, 100% { transform: translate(-40%, 100%); }
    33%      { transform: translate(-110%, 0%); }
    66%      { transform: translate(50%, -80%); }
}
@keyframes hr-bb-5 {
    0%, 100% { transform: translate(-20%, -100%); }
    33%      { transform: translate(80%, -60%); }
    66%      { transform: translate(100%, 40%); }
}
@keyframes hr-bb-6 {
    0%, 100% { transform: translate(70%, 70%); }
    33%      { transform: translate(-60%, 90%); }
    66%      { transform: translate(-100%, -30%); }
}

@media (prefers-reduced-motion: reduce) {
    .hr-bb { animation: none !important; }
}

@media (min-width: 821px) {
    .hr-contact { padding: 80px 2rem; }
    .hr-contact-grid { grid-template-columns: 1fr 1.4fr; gap: 60px; }
    .hr-boulier-balls { margin: 1.5rem 0 0; }
}
