/* SpeedDate — Élégance nocturne. Zéro CDN, polices système. */

:root {
    --bg-deep: #0d0814;
    --bg-card: #1a1226;
    --bg-elev: #211837;
    --txt-1:  #f3ebe0;
    --txt-2:  #b6a9c4;
    --txt-3:  #7a6f8a;
    --gold:   #c9a961;
    --gold-glow: rgba(201, 169, 97, 0.18);
    --rouge:  #b8474d;
    --vert:   #5d8a6a;
    --bordure: rgba(201, 169, 97, 0.22);
    --shadow: 0 8px 40px rgba(0,0,0,0.45);
    --serif: 'Cormorant Garamond', 'Garamond', 'EB Garamond', Georgia, 'Times New Roman', serif;
    --sans:  -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body {
    margin: 0; padding: 0;
    background: radial-gradient(ellipse at top, #1a1029 0%, var(--bg-deep) 60%, #08050d 100%);
    background-attachment: fixed;
    color: var(--txt-1);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.55;
    min-height: 100vh;
}
a { color: var(--gold); text-decoration: none; transition: color .2s; }
a:hover { color: #e2c577; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: 0.5px; color: var(--txt-1); }
h1 { font-size: 2.5rem; margin: 0 0 0.4em; font-style: italic; }
h2 { font-size: 1.7rem; margin: 1.4em 0 0.6em; color: var(--gold); }
h3 { font-size: 1.2rem; margin: 1em 0 0.4em; }

.container { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.2rem; }
.narrow    { max-width: 680px; margin: 0 auto; padding: 1.5rem 1.2rem; }

header.site {
    border-bottom: 1px solid var(--bordure);
    padding: 1.1rem 1.5rem;
    display: flex; justify-content: space-between; align-items: center;
    backdrop-filter: blur(8px);
    background: rgba(13, 8, 20, 0.7);
    position: sticky; top: 0; z-index: 50;
}
header.site .brand {
    font-family: var(--serif);
    font-size: 1.45rem;
    font-style: italic;
    color: var(--txt-1);
    letter-spacing: 0.6px;
}
header.site .brand span { color: var(--gold); }
header.site nav a {
    margin-left: 1.4rem;
    color: var(--txt-2);
    font-size: 0.95rem;
    transition: color .2s;
}
header.site nav a:hover, header.site nav a.active { color: var(--gold); }

footer.site {
    margin-top: 4rem;
    border-top: 1px solid var(--bordure);
    padding: 1.5rem;
    color: var(--txt-3);
    text-align: center;
    font-size: 0.85rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--bordure);
    border-radius: 14px;
    padding: 1.6rem 1.7rem;
    margin: 1rem 0;
    box-shadow: var(--shadow);
}

.btn {
    display: inline-block;
    background: var(--bg-elev);
    color: var(--txt-1);
    border: 1px solid var(--bordure);
    border-radius: 10px;
    padding: 0.7rem 1.4rem;
    font-size: 1rem;
    cursor: pointer;
    font-family: var(--sans);
    transition: all .25s;
}
.btn:hover { background: var(--gold); color: var(--bg-deep); border-color: var(--gold); box-shadow: 0 0 18px var(--gold-glow); }
.btn-gold {
    background: linear-gradient(135deg, #c9a961, #b08c45);
    color: var(--bg-deep);
    border: none;
    font-weight: 600;
}
.btn-gold:hover { box-shadow: 0 0 24px var(--gold-glow); transform: translateY(-1px); }
.btn-danger { background: var(--rouge); color: white; border: none; }
.btn-ghost { background: transparent; border: 1px solid var(--txt-3); color: var(--txt-2); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

label { display: block; color: var(--txt-2); font-size: 0.9rem; margin-bottom: 0.3rem; margin-top: 0.9rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=datetime-local], select, textarea {
    width: 100%;
    background: var(--bg-deep);
    color: var(--txt-1);
    border: 1px solid var(--bordure);
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    font-size: 1rem;
    font-family: var(--sans);
    transition: border .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-glow); }
textarea { min-height: 90px; resize: vertical; }

.alert { padding: 0.8rem 1rem; border-radius: 8px; margin: 0.8rem 0; font-size: 0.95rem; }
.alert-error   { background: rgba(184,71,77,0.18); color: #f5b8bb; border: 1px solid rgba(184,71,77,0.5); }
.alert-success { background: rgba(93,138,106,0.16); color: #b9d9be; border: 1px solid rgba(93,138,106,0.4); }
.alert-info    { background: var(--gold-glow); color: #e2c577; border: 1px solid var(--bordure); }

.hint { color: var(--txt-3); font-size: 0.85rem; margin-top: 0.3rem; }

.muted { color: var(--txt-3); }
.tag {
    display: inline-block;
    padding: 0.18rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    background: var(--bg-elev);
    color: var(--txt-2);
    border: 1px solid var(--bordure);
    margin-right: 0.4rem;
}
.tag-gold { background: var(--gold-glow); color: var(--gold); border-color: var(--gold); }

/* ========== HOME ========== */
.hero {
    text-align: center;
    padding: 5rem 1rem 3rem;
}
.hero h1 { font-size: 3.4rem; }
.hero .sous-titre {
    color: var(--txt-2);
    font-style: italic;
    font-family: var(--serif);
    font-size: 1.3rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}
.hero .cta { margin-top: 2rem; }
.hero .cta a { margin: 0 0.5rem; }

.principes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; margin: 3rem 0; }
.principe { background: var(--bg-card); padding: 1.5rem; border-radius: 12px; border: 1px solid var(--bordure); }
.principe h3 { color: var(--gold); margin-top: 0; font-family: var(--serif); }

/* ========== FORMS ========== */
.form-questionnaire .question {
    background: var(--bg-card);
    border: 1px solid var(--bordure);
    border-radius: 12px;
    padding: 1.3rem 1.5rem;
    margin-bottom: 1rem;
}
.form-questionnaire .question .num { color: var(--gold); font-family: var(--serif); font-size: 1.1rem; font-style: italic; }
.form-questionnaire .question .txt { font-size: 1.1rem; margin: 0.4rem 0 0.9rem; }
.form-questionnaire .options label {
    display: block;
    background: var(--bg-elev);
    padding: 0.7rem 0.95rem;
    margin-bottom: 0.4rem;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all .2s;
    color: var(--txt-1);
    font-size: 0.95rem;
}
.form-questionnaire .options label:hover { border-color: var(--gold); }
.form-questionnaire .options input[type=radio] { margin-right: 0.6rem; accent-color: var(--gold); }
.form-questionnaire .options input[type=radio]:checked + span { color: var(--gold); }

/* ========== EVENTS LIST ========== */
.events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.2rem; }
.event-card {
    background: var(--bg-card);
    border: 1px solid var(--bordure);
    border-radius: 14px;
    padding: 1.4rem 1.5rem;
    display: flex;
    flex-direction: column;
}
.event-card .titre { font-family: var(--serif); font-size: 1.4rem; color: var(--gold); }
.event-card .meta { color: var(--txt-2); font-size: 0.92rem; margin: 0.4rem 0 1rem; }
.event-card .progress { height: 4px; background: var(--bg-deep); border-radius: 4px; margin: 0.6rem 0; overflow: hidden; }
.event-card .progress > div { height: 100%; background: linear-gradient(90deg, #c9a961, #d6b572); }
.event-card .btns { margin-top: auto; padding-top: 0.8rem; }

/* ========== SESSION (live) ========== */
body.in-session { overflow: hidden; }
.session-wrap {
    height: calc(100vh - 0px);
    display: grid;
    grid-template-rows: 60px 1fr auto auto;
    background: var(--bg-deep);
}
.session-top {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 1.2rem;
    border-bottom: 1px solid var(--bordure);
    background: rgba(13,8,20,0.85);
}
.session-top .brand { font-family: var(--serif); font-style: italic; color: var(--txt-1); font-size: 1.1rem; }
.session-top .brand span { color: var(--gold); }
.session-top .meta { color: var(--txt-2); font-size: 0.95rem; }
.timer {
    font-family: var(--serif);
    font-size: 1.5rem;
    color: var(--gold);
    transition: color .3s;
    font-variant-numeric: tabular-nums;
}
.timer.danger { color: #ff7a7a; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: 0.55; } }

.video-area { position: relative; }
.video-partner {
    width: 100%; height: 100%; object-fit: cover;
    background: #000;
}
.video-self {
    position: absolute; bottom: 14px; right: 14px;
    width: 22vw; max-width: 240px; min-width: 130px;
    aspect-ratio: 4/3;
    border: 2px solid var(--gold);
    border-radius: 12px;
    background: #000;
    object-fit: cover;
    box-shadow: var(--shadow);
}
.partner-info {
    position: absolute;
    top: 14px; left: 14px;
    background: rgba(13,8,20,0.7);
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    backdrop-filter: blur(8px);
    color: var(--txt-1);
    font-family: var(--serif);
    font-size: 1.15rem;
    font-style: italic;
}
.fallback-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(180deg, rgba(13,8,20,0.4), rgba(13,8,20,0.95));
    color: var(--txt-2);
    font-family: var(--serif);
    font-size: 1.4rem;
    font-style: italic;
    text-align: center;
    padding: 2rem;
}
.fallback-overlay.audio::before { content:"♪"; font-size: 3rem; color: var(--gold); display: block; margin-bottom: 0.6rem; }

.briseglace {
    background: var(--bg-card);
    border-top: 1px solid var(--bordure);
    border-bottom: 1px solid var(--bordure);
    padding: 0.95rem 1.2rem;
    color: var(--txt-1);
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.05rem;
    text-align: center;
}
.briseglace strong { color: var(--gold); font-style: normal; font-family: var(--sans); font-size: 0.85rem; letter-spacing: 1px; text-transform: uppercase; margin-right: 0.6rem; }

.controls {
    display: flex; gap: 0.6rem;
    padding: 0.8rem 1.2rem;
    background: rgba(13,8,20,0.85);
    justify-content: center;
    align-items: center;
}
.controls button {
    background: var(--bg-elev);
    border: 1px solid var(--bordure);
    color: var(--txt-1);
    width: 52px; height: 52px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all .2s;
}
.controls button:hover { background: var(--gold); color: var(--bg-deep); transform: scale(1.05); }
.controls button.active { background: var(--rouge); color: white; }
.controls button.coeur { background: linear-gradient(135deg, #c9a961, #b08c45); color: var(--bg-deep); width: 60px; height: 60px; }
.controls button.coeur.sent { background: var(--rouge); color: white; pointer-events: none; }

.notes-pad {
    position: absolute; right: 14px; top: 80px;
    width: 280px;
    max-height: 65vh;
    background: rgba(26,18,38,0.96);
    border: 1px solid var(--bordure);
    border-radius: 12px;
    padding: 0.9rem;
    display: none;
    flex-direction: column;
    backdrop-filter: blur(10px);
}
.notes-pad.open { display: flex; }
.notes-pad h4 { margin: 0 0 0.5rem; color: var(--gold); font-family: var(--serif); font-style: italic; }
.notes-pad textarea { background: var(--bg-deep); resize: none; flex: 1; min-height: 200px; }
.notes-pad .info { font-size: 0.78rem; color: var(--txt-3); margin-top: 0.4rem; }

/* Loader animation : cœurs qui se rencontrent */
.loader-wrap {
    position: fixed; inset: 0;
    background: var(--bg-deep);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    z-index: 100;
    transition: opacity .8s;
}
.loader-wrap.hidden { opacity: 0; pointer-events: none; }
.loader-hearts { position: relative; width: 160px; height: 80px; }
.loader-hearts span {
    position: absolute; top: 50%; transform: translateY(-50%);
    color: var(--gold);
    font-size: 3rem;
    animation: heartMove 2.2s infinite ease-in-out;
}
.loader-hearts span:nth-child(1) { left: 0;  animation-name: heartLeft; }
.loader-hearts span:nth-child(2) { right: 0; animation-name: heartRight; }
@keyframes heartLeft  { 0%,100%{ left: 0; opacity: 0.5; } 50%{ left: 50%; transform: translate(-50%,-50%) scale(1.3); opacity: 1; } }
@keyframes heartRight { 0%,100%{ right: 0; opacity: 0.5; } 50%{ right: 50%; transform: translate(50%,-50%) scale(1.3); opacity: 1; } }
.loader-text { color: var(--txt-2); font-family: var(--serif); font-style: italic; font-size: 1.2rem; margin-top: 1.5rem; }

/* Responsive */
@media (max-width: 700px) {
    h1 { font-size: 2rem; }
    .hero h1 { font-size: 2.4rem; }
    .video-self { width: 30vw; }
    .controls button { width: 46px; height: 46px; font-size: 1.1rem; }
    .controls button.coeur { width: 54px; height: 54px; }
    .notes-pad { right: 8px; left: 8px; width: auto; }
    header.site nav a { margin-left: 0.7rem; font-size: 0.85rem; }
}

/* Utilitaire formulaires */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.center { text-align: center; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 2rem; }
