:root {
    --eau: #2b9ec4;
    --eau-clair: #7fd0e8;
    --eau-fonce: #1b6b8a;
    --loutre: #8a5a3b;
    --loutre-clair: #b98a63;
    --creme: #fef8f0;
    --creme-carte: #ffffff;
    --texte: #2d3436;
    --texte-doux: #6c7a80;
    --ok: #2e8b57;
    --err: #d84343;
    --ombre: 0 10px 30px rgba(27, 107, 138, 0.15);
    --radius: 20px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Nunito', system-ui, sans-serif;
    color: var(--texte);
    background: linear-gradient(180deg, #e8f7fc 0%, var(--creme) 40%);
    min-height: 100vh;
    line-height: 1.6;
}

h1, h2, h3 { font-family: 'Baloo 2', system-ui, sans-serif; margin: 0; }

/* ---- Bulles / emojis flottants en fond ---- */
.bulles {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.bulles span {
    position: absolute;
    bottom: -60px;
    font-size: 2rem;
    opacity: 0.5;
    animation: monte linear infinite;
}
.bulles span:nth-child(1) { left: 6%;  animation-duration: 15s; }
.bulles span:nth-child(2) { left: 18%; animation-duration: 11s; font-size: 1.2rem; }
.bulles span:nth-child(3) { left: 32%; animation-duration: 18s; }
.bulles span:nth-child(4) { left: 47%; animation-duration: 13s; }
.bulles span:nth-child(5) { left: 61%; animation-duration: 16s; }
.bulles span:nth-child(6) { left: 74%; animation-duration: 10s; font-size: 1.1rem; }
.bulles span:nth-child(7) { left: 85%; animation-duration: 19s; }
.bulles span:nth-child(8) { left: 93%; animation-duration: 14s; }

@keyframes monte {
    0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
    10%  { opacity: 0.5; }
    90%  { opacity: 0.5; }
    100% { transform: translateY(-110vh) rotate(360deg); opacity: 0; }
}

/* ---- Hero ---- */
.hero {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 4rem 1.5rem 5rem;
    background: radial-gradient(ellipse at top, rgba(127, 208, 232, 0.35), transparent 70%);
}
.hero-inner { max-width: 720px; margin: 0 auto; }
.loutre-emoji {
    font-size: 5rem;
    display: inline-block;
    animation: flotte 3s ease-in-out infinite;
    filter: drop-shadow(0 8px 12px rgba(0,0,0,0.15));
}
@keyframes flotte {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    50%      { transform: translateY(-14px) rotate(4deg); }
}
.kicker {
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--eau-fonce);
    font-weight: 700;
    margin: 1rem 0 0.2rem;
    font-size: 0.85rem;
}
.hero h1 {
    font-size: clamp(3rem, 12vw, 6rem);
    font-weight: 800;
    color: var(--eau-fonce);
    line-height: 1;
    background: linear-gradient(120deg, var(--eau), var(--loutre));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.tagline { font-size: 1.25rem; color: var(--texte-doux); margin: 0.8rem 0 1.5rem; }

/* ---- Compte à rebours ---- */
.countdown {
    display: flex;
    justify-content: center;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin: 0 auto 2rem;
    max-width: 460px;
}
.cd-bloc {
    background: #fff;
    border: 2px solid rgba(127, 208, 232, 0.35);
    border-radius: 16px;
    padding: 0.7rem 0.4rem;
    min-width: 74px;
    box-shadow: var(--ombre);
}
.cd-num {
    display: block;
    font-family: 'Baloo 2', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--eau-fonce);
    line-height: 1;
}
.cd-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--texte-doux);
    margin-top: 0.25rem;
    font-weight: 700;
}
.cd-fete {
    font-family: 'Baloo 2', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--loutre);
    background: #fff;
    padding: 1rem 1.4rem;
    border-radius: 18px;
    box-shadow: var(--ombre);
    animation: flotte 3s ease-in-out infinite;
}

.btn-scroll {
    display: inline-block;
    background: var(--eau);
    color: #fff;
    text-decoration: none;
    padding: 0.9rem 1.8rem;
    border-radius: 999px;
    font-weight: 700;
    box-shadow: var(--ombre);
    transition: transform 0.15s, background 0.2s;
}
.btn-scroll:hover { transform: translateY(-3px); background: var(--eau-fonce); }

/* ---- Contenu ---- */
main {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0 auto;
    padding: 0 1.2rem 4rem;
}

.card {
    background: var(--creme-carte);
    border-radius: var(--radius);
    padding: 1.6rem;
    box-shadow: var(--ombre);
    border: 2px solid rgba(127, 208, 232, 0.25);
}

.intro-card h2 { color: var(--eau-fonce); margin-bottom: 0.6rem; }
.intro { margin-bottom: 2.5rem; }

.messageswana h2 {
    text-align: center;
    font-size: 2rem;
    color: var(--eau-fonce);
    margin-bottom: 1.2rem;
}

/* ---- Alertes ---- */
.alert {
    border-radius: 14px;
    padding: 0.9rem 1.1rem;
    margin-bottom: 1.2rem;
    font-weight: 700;
    text-align: center;
}
.alert-ok  { background: #e3f6ec; color: var(--ok);  border: 2px solid #b6e6cb; }
.alert-err { background: #fdeaea; color: var(--err); border: 2px solid #f4c4c4; }

/* ---- Formulaire ---- */
.form-card { margin-bottom: 2.5rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; margin-bottom: 0.4rem; color: var(--eau-fonce); }
.req { color: var(--err); }

textarea, input[type="text"] {
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
    padding: 0.8rem 1rem;
    border: 2px solid #dbeef5;
    border-radius: 14px;
    background: #f8fdff;
    color: var(--texte);
    resize: vertical;
    transition: border-color 0.2s;
}
textarea:focus, input[type="text"]:focus {
    outline: none;
    border-color: var(--eau);
    background: #fff;
}

.check {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    color: var(--texte-doux);
    cursor: pointer;
    margin-bottom: 1.3rem;
}
.check input { width: 1.2rem; height: 1.2rem; accent-color: var(--eau); }

.btn-submit {
    width: 100%;
    border: none;
    cursor: pointer;
    background: linear-gradient(120deg, var(--eau), var(--eau-fonce));
    color: #fff;
    font-family: 'Baloo 2', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    padding: 0.95rem;
    border-radius: 14px;
    box-shadow: var(--ombre);
    transition: transform 0.15s, filter 0.2s;
}
.btn-submit:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn-submit:active { transform: translateY(0); }

/* Honeypot invisible */
.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---- Messages ---- */
.compteur { text-align: center; color: var(--texte-doux); font-weight: 700; margin-bottom: 1.2rem; }

.message-card { margin-bottom: 1rem; animation: apparait 0.4s ease both; }
@keyframes apparait {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.message-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}
.auteur { font-weight: 800; color: var(--loutre); font-family: 'Baloo 2', sans-serif; }
.auteur.anonyme { color: var(--texte-doux); }
.message-head time { font-size: 0.8rem; color: var(--texte-doux); }
.message-texte { margin: 0; white-space: pre-wrap; word-break: break-word; }

.vide-card { text-align: center; color: var(--texte-doux); }
.prive-card { text-align: center; color: var(--texte-doux); }
.compteur-discret {
    margin: 0.8rem 0 0;
    font-weight: 700;
    color: var(--eau-fonce);
}

footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem 1rem 3rem;
    color: var(--texte-doux);
    font-weight: 600;
}

@media (max-width: 480px) {
    .card { padding: 1.2rem; }
    .hero { padding: 3rem 1rem 4rem; }
    .cd-bloc { min-width: 62px; }
    .cd-num { font-size: 1.5rem; }
}

/* ---- Page admin ---- */
.admin {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0 auto;
    padding: 2.5rem 1.2rem 4rem;
}
.admin-titre {
    text-align: center;
    color: var(--eau-fonce);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}
.admin-barre {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    font-weight: 700;
    color: var(--texte-doux);
}
.inline-form { margin: 0; }
.admin-actions { display: flex; align-items: center; gap: 0.6rem; }
.btn-export {
    display: inline-block;
    text-decoration: none;
    border: 2px solid #b6e6cb;
    background: #e3f6ec;
    color: var(--ok);
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    transition: background 0.2s;
}
.btn-export:hover { background: #d2f0e0; }
.btn-logout {
    border: 2px solid #dbeef5;
    background: #fff;
    color: var(--eau-fonce);
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-logout:hover { background: #eef8fc; }
.btn-delete {
    margin-top: 0.8rem;
    border: 2px solid #f4c4c4;
    background: #fff;
    color: var(--err);
    font-weight: 700;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-delete:hover { background: #fdeaea; }
.admin-id { color: var(--texte-doux); font-weight: 600; font-size: 0.75rem; }
.admin-retour { text-align: center; margin-top: 1.5rem; }
.admin-retour a { color: var(--eau-fonce); font-weight: 700; text-decoration: none; }
.admin-retour a:hover { text-decoration: underline; }
