:root{
    --primary:#111827;
    --accent:#8b5cf6;
    --bg:#eef1f5;
    --text:#111827;
    --surface:rgba(255,255,255,.92);
    --surface-strong:#5f6d81;
    --border-soft:rgba(255,255,255,.14);
    --shadow-soft:0 10px 25px rgba(0,0,0,.12);
}

*{
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    margin:0;
    background:var(--bg);
    color:var(--text);
    font-family:Arial,Helvetica,sans-serif;
    line-height:1.5;
}

img{
    max-width:100%;
    display:block;
}

a{
    color:inherit;
    text-decoration:none;
}

.container{
    width:min(1180px,calc(100% - 2rem));
    margin:0 auto;
}

/* =========================
   TOPBAR
========================= */

.topbar{
    position:sticky;
    top:0;
    z-index:1000;
    background:rgba(255,255,255,.97);
    backdrop-filter:blur(10px);
    border-bottom:1px solid rgba(0,0,0,.08);
}

.site-header{
    display:grid;
    grid-template-columns:220px 1fr 120px;
    align-items:center;
    min-height:74px;
    gap:1rem;
}

.site-header__brand{
    font-size:1.55rem;
    font-weight:800;
    color:#111827;
    white-space:nowrap;
}

.site-header__nav{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:1.35rem;
    flex-wrap:nowrap;
}

.site-header__nav a{
    font-size:.98rem;
    font-weight:700;
    color:#1f2937;
    white-space:nowrap;
    transition:opacity .2s ease;
}

.site-header__nav a:hover{
    opacity:.65;
}

.site-header__lang{
    display:flex;
    justify-content:flex-end;
    align-items:center;
    gap:.5rem;
}

.site-header__lang a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:42px;
    height:34px;
    padding:0 .75rem;
    border-radius:6px;
    background:#ececec;
    color:#333;
    font-size:.85rem;
    font-weight:800;
    transition:background .2s ease,color .2s ease,opacity .2s ease;
}

.site-header__lang a:hover{
    opacity:.85;
}

.site-header__lang a.active{
    background:var(--accent);
    color:#fff;
}

/* =========================
   MESSAGES FLASH
========================= */

.flash{
    width:min(1180px,calc(100% - 2rem));
    margin:1rem auto 0;
    padding:1rem 1.2rem;
    border-radius:16px;
    font-weight:700;
}

.flash.success{
    background:rgba(34,197,94,.12);
    color:#166534;
    border:1px solid rgba(34,197,94,.22);
}

.flash.error{
    background:rgba(239,68,68,.12);
    color:#991b1b;
    border:1px solid rgba(239,68,68,.22);
}

/* =========================
   HERO AVEC IMAGE CENTRÉE
   ET BORDS NOIRS
========================= */

.hero-shell{
    background:#000;
    padding:0;
}

.hero-frame{
    position:relative;
    width:100%;
    max-width:1400px;
    height:640px;
    margin:0 auto;
    overflow:hidden;
    background:#000;
}

.hero-image{
    position:absolute;
    inset:0;
    background-repeat:no-repeat;
    background-size:contain;
    background-position:center center;
    background-color:#000;
}

.hero-overlay{
    position:absolute;
    inset:0;
    background:linear-gradient(
        90deg,
        rgba(255,255,255,.06) 0%,
        rgba(255,255,255,.03) 40%,
        rgba(0,0,0,.08) 100%
    );
    pointer-events:none;
}

.hero-content{
    position:relative;
    z-index:2;
    height:100%;
    display:flex;
    align-items:flex-start;
    justify-content:flex-end;
    padding-top:3rem;
}

.hero-title-box{
    max-width:520px;
    text-align:right;
    text-shadow:0 4px 12px rgba(0,0,0,.22);
}

.hero-title-box h1{
    margin:0 0 1rem;
    font-size:clamp(2.4rem,5vw,5rem);
    line-height:1.02;
    color:rgba(255,255,255,.95);
    font-weight:800;
}

.hero-years{
    font-size:clamp(2rem,4vw,4rem);
    font-weight:800;
    color:#fff;
}

/* =========================
   STATS EN DESSOUS DU HERO
========================= */

.stats-section{
    margin-top:0;
    padding:2rem 0 0;
    background:var(--bg);
}

.stats-panel{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:1rem;
    background:#5f6d81;
    border-radius:22px;
    padding:1rem 1.2rem;
    box-shadow:0 14px 32px rgba(0,0,0,.16);
}

.stat{
    background:rgba(255,255,255,.10);
    border:1px solid rgba(255,255,255,.12);
    border-radius:18px;
    padding:1rem;
    color:#fff;
    min-height:88px;
}

.stat strong{
    display:block;
    font-size:1.35rem;
    margin-bottom:.2rem;
    color:#fff;
}

.stat span{
    color:rgba(255,255,255,.94);
}

/* =========================
   STRUCTURE GÉNÉRALE
========================= */

section{
    padding:3rem 0;
}

.grid{
    display:grid;
    gap:1.25rem;
}

.grid-2{
    grid-template-columns:repeat(2,minmax(0,1fr));
}

.grid-3{
    grid-template-columns:repeat(3,minmax(0,1fr));
}

.card{
    background:var(--surface);
    border:1px solid rgba(0,0,0,.05);
    border-radius:20px;
    padding:1.25rem;
    box-shadow:var(--shadow-soft);
}

.prose-content > *:first-child,
.card > *:first-child{
    margin-top:0;
}

.prose-content > *:last-child,
.card > *:last-child{
    margin-bottom:0;
}

/* =========================
   GALERIE
========================= */

.gallery{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:1rem;
}

.photo-card img{
    width:100%;
    aspect-ratio:4/3;
    object-fit:cover;
    border-radius:14px;
    margin-bottom:.85rem;
}

.meta strong{
    display:block;
    margin-bottom:.25rem;
}

/* =========================
   LISTES / TEXTES
========================= */

.list-stack{
    display:grid;
    gap:1rem;
}

.message{
    white-space:pre-wrap;
}

.muted{
    color:rgba(17,24,39,.68);
}

/* =========================
   FORMULAIRES
========================= */

.field{
    margin-bottom:1rem;
}

label{
    display:block;
    margin-bottom:.45rem;
    font-weight:700;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="file"],
textarea{
    width:100%;
    border:1px solid rgba(0,0,0,.10);
    border-radius:14px;
    padding:.85rem .95rem;
    background:#fff;
    color:var(--text);
    font:inherit;
}

textarea{
    min-height:140px;
    resize:vertical;
}

.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:.5rem;
    border:0;
    border-radius:999px;
    padding:.8rem 1.05rem;
    font-weight:800;
    background:var(--accent);
    color:#fff;
    cursor:pointer;
}

/* =========================
   PLAYER AUDIO
========================= */

.music-player{
    position:fixed;
    bottom:1rem;
    left:1rem;
    right:1rem;
    z-index:9999;
    pointer-events:none;
}

.music-player__inner{
    max-width:540px;
    margin:auto;
    background:rgba(17,24,39,.92);
    color:#fff;
    padding:1rem 1.1rem;
    border-radius:16px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:1rem;
    box-shadow:0 10px 25px rgba(0,0,0,.28);
    pointer-events:auto;
}

.music-player__title{
    font-weight:700;
    line-height:1.3;
}

.music-player__button{
    border:0;
    background:var(--accent);
    color:#fff;
    padding:.7rem 1rem;
    border-radius:999px;
    cursor:pointer;
    font-weight:700;
    min-width:70px;
}

/* =========================
   BOUGIES
========================= */

.candle-grid{
    align-items:start;
}

.candle-card,
.candle-carousel-card{
    min-height:100%;
}

.candle-form .muted{
    margin-top:.4rem;
}

#paypal-button-container{
    margin-top:1rem;
    min-height:45px;
}

.status-error{
    color:#b91c1c;
    font-weight:700;
}

.candle-carousel-mask{
    overflow:hidden;
    position:relative;
}

.candle-carousel-track{
    display:flex;
    gap:1rem;
    align-items:stretch;
}

.candle-carousel-track.is-animated{
    width:max-content;
    animation:scrollCandles 28s linear infinite;
}

.candle-item{
    min-width:220px;
    max-width:220px;
    border-radius:20px;
    padding:1rem;
    background:linear-gradient(180deg,#fff7cc 0%,#ffe082 55%,#ffca28 100%);
    box-shadow:0 12px 25px rgba(0,0,0,.12);
    text-align:center;
    border:1px solid rgba(0,0,0,.08);
}

.candle-emoji{
    font-size:3rem;
    line-height:1;
}

.candle-name{
    margin-top:.75rem;
    font-size:1.1rem;
    font-weight:800;
    min-height:2.6rem;
    display:flex;
    align-items:center;
    justify-content:center;
}

.candle-meta{
    font-size:.9rem;
    color:#5b4636;
    margin-top:.35rem;
}

/* =========================
   FOOTER
========================= */

.memorial-footer{
    padding:2rem 0 4rem;
    background:rgba(15,23,42,.96);
    color:#fff;
}

.footer-center{
    text-align:center;
}

.footer-tribute-image{
    margin:1rem auto 0;
    max-width:220px;
    border-radius:22px;
}

.footer-copy,
.footer-date{
    opacity:.92;
}

/* =========================
   ANIMATIONS
========================= */

@keyframes scrollCandles{
    0%{transform:translateX(0)}
    100%{transform:translateX(calc(-50% - .5rem))}
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width:960px){
    .site-header{
        grid-template-columns:1fr;
        gap:.8rem;
        padding:.8rem 0;
    }

    .site-header__brand{
        text-align:center;
        font-size:1.3rem;
    }

    .site-header__nav{
        flex-wrap:wrap;
        gap:.85rem;
    }

    .site-header__lang{
        justify-content:center;
    }

    .hero-frame{
        height:460px;
    }

    .hero-content{
        justify-content:center;
        align-items:flex-end;
        padding-bottom:2rem;
        padding-top:2rem;
    }

    .hero-title-box{
        max-width:100%;
        text-align:center;
    }

    .stats-panel,
    .grid-2,
    .grid-3,
    .gallery{
        grid-template-columns:1fr;
    }
}