/* Lunch & Learn — identité de L'Antidote (lantidote.com) */

:root {
    --red: #f03737;
    --red-dark: #d63738;
    --black: #000;
    --surface: #0e0e0e;
    --surface-2: #161616;
    --line: rgb(255 255 255 / 0.12);
    --line-strong: rgb(255 255 255 / 0.28);
    --white: #fff;
    --muted: rgb(255 255 255 / 0.6);
    --success: #4ade80;
    --warning: #fbbf24;
    --font: "canada-type-gibson", "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --gutter: clamp(1rem, 4vw, 4rem);
    --ease: 0.3s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--black);
    color: var(--white);
    font-family: var(--font);
    font-weight: 300;
    font-size: 1.125rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--ease);
}

h1,
h2,
h3 {
    margin: 0;
    font-weight: 600;
    line-height: 1.1;
}

p {
    margin: 0;
}

img {
    max-width: 100%;
}

:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    left: -9999px;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
    z-index: 10;
    padding: 0.5rem 1rem;
    background: var(--red);
}

/* En-tête ------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem var(--gutter);
    background: var(--black);
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.brand-logo {
    height: 1.6rem;
    display: block;
}

.brand-sep {
    width: 1px;
    height: 1.4rem;
    background: var(--line-strong);
}

.brand-name {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.site-nav {
    display: flex;
    gap: 2.25rem;
    margin-left: auto;
    flex-wrap: wrap;
}

.site-nav a,
.link-button {
    position: relative;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Soulignement rouge qui s'ouvre depuis le centre, comme le menu du site. */
.site-nav a::before,
.site-nav a::after {
    content: "";
    position: absolute;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: var(--red);
    transition: width var(--ease);
}

.site-nav a::before {
    left: 50%;
}

.site-nav a::after {
    right: 50%;
}

.site-nav a:hover::before,
.site-nav a:hover::after,
.site-nav a.active::before,
.site-nav a.active::after {
    width: 50%;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-left: 2rem;
    border-left: 1px solid var(--line);
}

.avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    font-size: 0.95rem;
    color: var(--muted);
}

.user-menu form {
    margin: 0;
}

.link-button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--muted);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}

.link-button:hover {
    color: var(--red);
}

/* Structure ----------------------------------------------------------- */

.site-main {
    flex: 1;
    width: 100%;
    max-width: 90rem;
    margin: 0 auto;
    padding: 2rem var(--gutter) 6rem;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 2rem var(--gutter);
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.site-footer a:hover {
    color: var(--red);
}

/* Typographie --------------------------------------------------------- */

.eyebrow {
    margin-bottom: 1rem;
    color: var(--red);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.display {
    font-size: clamp(4rem, 13vw, 11rem);
    line-height: 0.92;
    letter-spacing: -0.02em;
}

.title {
    font-size: clamp(2.75rem, 7vw, 5.5rem);
    letter-spacing: -0.01em;
}

.lead {
    max-width: 44rem;
    margin-top: 1.75rem;
    color: var(--muted);
    font-size: clamp(1.15rem, 1.6vw, 1.4rem);
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 0.9rem;
}

.hero {
    padding: clamp(2rem, 8vh, 6rem) 0 clamp(3rem, 8vh, 5rem);
}

.hero-login {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    min-height: calc(100vh - 14rem);
    justify-content: center;
}

.hero-login .cta {
    margin-top: 3rem;
    margin-bottom: 1rem;
}

.page-head {
    padding: clamp(1.5rem, 5vh, 4rem) 0 3rem;
}

.section {
    margin-top: 5rem;
}

.section-title {
    margin-bottom: 1.5rem;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
}

/* Boutons ------------------------------------------------------------- */

.cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border: 2px solid var(--red);
    background: var(--red);
    color: var(--white);
    font-family: inherit;
    font-weight: 600;
    font-size: 1.05rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color var(--ease), color var(--ease);
}

.cta:hover {
    background: transparent;
}

.cta-icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* Messages ------------------------------------------------------------ */

.flash,
.alert {
    margin-bottom: 2rem;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--success);
    background: var(--surface);
}

.alert {
    border-left-color: var(--red);
}

.hero-login .alert {
    margin: 2rem 0 0;
}

.empty {
    padding: 3rem;
    border: 1px dashed var(--line-strong);
    color: var(--muted);
    text-align: center;
}

/* Accueil : étapes ---------------------------------------------------- */

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
    gap: 1.5rem;
}

.step {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: clamp(1.5rem, 3vw, 2.75rem);
    border: 1px solid var(--line);
    background: var(--surface);
    transition: border-color var(--ease);
}

.step.is-open:hover {
    border-color: var(--red);
}

.step:not(.is-open) {
    opacity: 0.55;
}

.step-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.step-number {
    color: var(--red);
    font-weight: 600;
    font-size: 3.5rem;
    line-height: 1;
}

.step h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
}

.step p {
    color: var(--muted);
}

.step .cta {
    align-self: flex-start;
    margin-top: auto;
}

.pill {
    padding: 0.3rem 0.9rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--muted);
}

.pill-open {
    border-color: var(--red);
    color: var(--white);
    background: var(--red);
}

.progress {
    font-weight: 600;
    color: var(--white) !important;
}

.progress.is-complete::before {
    content: "✓ ";
    color: var(--success);
}

/* Accueil : agenda ---------------------------------------------------- */

.agenda {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--line);
}

.agenda-item {
    display: grid;
    grid-template-columns: 9rem 1fr auto;
    gap: 1.5rem;
    align-items: center;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--line);
}

.agenda-date {
    color: var(--muted);
    font-size: 0.95rem;
    text-transform: uppercase;
}

.agenda-title {
    font-weight: 600;
}

.agenda-presenter {
    display: block;
    color: var(--muted);
    font-weight: 300;
    font-size: 0.95rem;
}

.status {
    padding: 0.25rem 0.8rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid var(--line-strong);
    color: var(--muted);
}

.status-confirmed {
    border-color: var(--success);
    color: var(--success);
}

.status-waitlisted {
    border-color: var(--warning);
    color: var(--warning);
}

/* Formulaire des idées ------------------------------------------------ */

.ideas-form {
    display: grid;
    gap: 1.5rem;
}

.idea {
    margin: 0;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    border: 1px solid var(--line);
    background: var(--surface);
}

.idea-number {
    float: left;
    width: 100%;
    margin-bottom: 1.75rem;
    padding: 0;
    color: var(--red);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.idea-optional {
    color: var(--muted);
    font-weight: 300;
}

.idea-fields {
    clear: both;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem 2rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.field-full {
    grid-column: 1 / -1;
}

.field label {
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 0.85rem 0;
    border: 0;
    border-bottom: 2px solid var(--line-strong);
    border-radius: 0;
    background: transparent;
    color: var(--white);
    font-family: inherit;
    font-size: 1.2rem;
    font-weight: 300;
    transition: border-color var(--ease);
}

.field textarea {
    resize: vertical;
    min-height: 6rem;
}

.field select {
    appearance: none;
    padding-right: 2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath d='M5.3 7.3a1 1 0 0 1 1.4 0L10 10.6l3.3-3.3a1 1 0 1 1 1.4 1.4l-4 4a1 1 0 0 1-1.4 0l-4-4a1 1 0 0 1 0-1.4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.25rem center;
    background-size: 1.1rem;
    cursor: pointer;
}

.field select option {
    background: var(--surface-2);
}

.field input::placeholder,
.field textarea::placeholder {
    color: rgb(255 255 255 / 0.3);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-bottom-color: var(--red);
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
    border-bottom-color: var(--red);
}

.field-error {
    color: var(--red);
    font-size: 0.9rem;
}

.field-help {
    color: var(--muted);
    font-size: 0.9rem;
}

.idea-month .field {
    max-width: 24rem;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 1rem;
}

/* Choix des Lunch & Learns -------------------------------------------- */

.talks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 30rem), 1fr));
    gap: 1rem;
}

.talk {
    position: relative;
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 1.5rem;
    padding: 1.5rem 3.5rem 1.5rem 1.5rem;
    border: 2px solid var(--line);
    background: var(--surface);
    cursor: pointer;
    transition: border-color var(--ease), background-color var(--ease), opacity var(--ease);
}

.talk:not(.is-locked):hover {
    border-color: var(--line-strong);
}

.talk input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.talk:has(input:checked) {
    border-color: var(--red);
    background: var(--surface-2);
}

.talk:has(input:focus-visible) {
    outline: 2px solid var(--red);
    outline-offset: 3px;
}

.talk.is-disabled {
    opacity: 0.45;
}

.talk-check {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 1.6rem;
    height: 1.6rem;
    border: 2px solid var(--line-strong);
    transition: all var(--ease);
}

.talk:has(input:checked) .talk-check {
    border-color: var(--red);
    background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath d='M16.7 5.3a1 1 0 0 1 0 1.4l-8 8a1 1 0 0 1-1.4 0l-4-4a1 1 0 1 1 1.4-1.4L8 12.6l7.3-7.3a1 1 0 0 1 1.4 0z'/%3E%3C/svg%3E") center / 1rem no-repeat;
}

.talk-date {
    display: flex;
    flex-direction: column;
    padding-right: 1.25rem;
    border-right: 1px solid var(--line);
    text-transform: uppercase;
}

.talk-day {
    color: var(--red);
    font-weight: 600;
    font-size: 2.75rem;
    line-height: 1;
}

.talk-month {
    margin-top: 0.35rem;
    font-weight: 600;
    font-size: 0.85rem;
}

.talk-time {
    color: var(--muted);
    font-size: 0.85rem;
}

.talk-body {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.talk-title {
    font-weight: 600;
    font-size: 1.3rem;
    line-height: 1.25;
}

.talk-presenter {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0.25rem 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.talk-presenter-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--red);
    color: var(--white);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.talk-presenter-label {
    color: var(--muted);
    font-weight: 300;
}

.talk.is-locked {
    cursor: default;
    border-style: dashed;
}

.talk.is-locked .talk-title,
.talk.is-locked .talk-description,
.talk.is-locked .talk-date {
    opacity: 0.6;
}

.talk.is-locked {
    padding-right: 1.5rem;
}

.talk-locked {
    align-self: flex-start;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--red);
    border-radius: 999px;
    color: var(--red);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.talk-description {
    color: var(--muted);
    font-size: 1rem;
}

.talk-seats {
    margin-top: 0.4rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--muted);
}

.talk-seats.is-full {
    color: var(--warning);
}

.sticky-bar {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--line);
    background: var(--black);
}

.counter {
    font-size: 1.2rem;
    text-transform: uppercase;
}

.counter strong {
    color: var(--red);
    font-size: 2rem;
    font-weight: 600;
}

.counter.is-complete strong {
    color: var(--success);
}

/* Mobile -------------------------------------------------------------- */

@media (max-width: 860px) {
    .site-header {
        gap: 1rem 1.5rem;
    }

    .site-nav {
        order: 3;
        width: 100%;
        margin-left: 0;
        gap: 1.5rem;
        overflow-x: auto;
    }

    .user-menu {
        margin-left: auto;
        padding-left: 0;
        border-left: 0;
    }

    .user-name {
        display: none;
    }

    .idea-fields {
        grid-template-columns: 1fr;
    }

    .agenda-item {
        grid-template-columns: 1fr auto;
    }

    .agenda-date {
        grid-column: 1 / -1;
    }

    .talk {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .talk-date {
        flex-direction: row;
        align-items: baseline;
        gap: 0.5rem;
        padding: 0 0 0.75rem;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .talk-day {
        font-size: 1.75rem;
    }

    .sticky-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .sticky-bar .cta {
        justify-content: center;
    }
}
