/* =============================================================================
   public.css — Page publique (front)
   ============================================================================= */

.public-body {
    font-family: var(--app-font);
    color: var(--app-text);
    background:
        radial-gradient(
            circle at top left,
            color-mix(in srgb, var(--app-accent) 14%, transparent),
            transparent 34rem
        ),
        var(--app-background);
    min-height: 100vh;
    margin: 0;
}

.app-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: clamp(32px, 6vw, 72px) 0;
}

/* Hero --------------------------------------------------------------------- */
.hero { text-align: center; }

.public-logo {
    max-height: 96px;
    margin: 0 auto 1.5rem;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: color-mix(in srgb, var(--app-text) 75%, transparent);
    max-width: 60ch;
    margin: 0 auto 1.5rem;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    margin-bottom: 1.75rem;
}

/* Bouton d'inscription (CTA) ----------------------------------------------- */
.cta-inline {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
}

/* Plus grand et plus présent sur grand écran. */
.app-button-cta {
    font-size: 1.2rem;
    padding: 1.05rem 2.6rem;
    box-shadow: 0 14px 30px color-mix(in srgb, var(--app-accent) 32%, transparent);
}

/* Bouton flottant : masqué par défaut, affiché sur mobile uniquement. */
.cta-floating { display: none; }

@media (max-width: 760px) {
    /* On masque le CTA en flux et on active la barre flottante. */
    .cta-inline { display: none; }

    .cta-floating {
        display: flex;
        justify-content: center;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 50;
        padding: 1.5rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
        /* Bandeau dégradé d'opacité pour la lisibilité au-dessus du contenu. */
        background: linear-gradient(
            to top,
            color-mix(in srgb, var(--app-background) 96%, transparent) 35%,
            transparent 100%
        );
        pointer-events: none;
    }
    .cta-floating .app-button-cta {
        pointer-events: auto;
        width: min(420px, 100%);
        font-size: 1.1rem;
    }

    /* Évite que la barre flottante ne masque la fin du contenu. */
    .mode-open .app-shell { padding-bottom: 7rem; }
}

/* Affiche ------------------------------------------------------------------ */
.poster-card { text-align: center; }
.poster-image {
    max-height: 70vh;
    width: auto;
    margin: 0 auto;
    border-radius: var(--app-radius-sm);
}

/* Intervenants — grille de pastilles photo ---------------------------------
   Section à hauteur adaptative : seules les pastilles (photo + nom + rôle)
   sont visibles ; la description s'ouvre dans une bulle au clic. */
.speakers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.speaker-tile {
    position: relative;
    aspect-ratio: 1 / 1;
    width: 100%;
    padding: 0;
    border: none;
    border-radius: var(--app-radius-sm);
    overflow: hidden;
    cursor: pointer;
    background: color-mix(in srgb, var(--app-accent) 16%, #fff);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transition: transform 160ms ease, box-shadow 160ms ease;
    color: #fff;
    text-align: left;
}
.speaker-tile:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14); }
.speaker-tile.is-static { cursor: default; }
.speaker-tile.is-active {
    outline: 3px solid var(--app-accent-2);
    outline-offset: 2px;
}

.speaker-tile-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Repli sans photo : initiales sur un dégradé des deux couleurs d'accent. */
.speaker-tile-initials {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--app-accent), var(--app-accent-2));
    color: #fff;
}

/* Bandeau dégradé en bas, sur lequel s'inscrivent nom et rôle. */
.speaker-tile-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.4rem 0.85rem 0.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    background: linear-gradient(
        to top,
        color-mix(in srgb, var(--app-accent-2) 92%, #000 8%) 0%,
        color-mix(in srgb, var(--app-accent-2) 70%, transparent) 55%,
        transparent 100%
    );
}
.speaker-tile-name { font-weight: 800; line-height: 1.15; text-shadow: 0 1px 3px rgba(0,0,0,0.35); }
.speaker-tile-role { font-size: 0.85rem; opacity: 0.95; text-shadow: 0 1px 3px rgba(0,0,0,0.35); }

.speaker-tile-more {
    position: absolute;
    top: 0.5rem;
    right: 0.6rem;
    width: 1.6rem;
    height: 1.6rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    color: transparent;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    transition: transform 160ms ease;
}
.speaker-tile-more::before,
.speaker-tile-more::after {
    content: "";
    position: absolute;
    width: 0.75rem;
    height: 0.12rem;
    border-radius: 999px;
    background: var(--app-accent);
}
.speaker-tile-more::after { transform: rotate(90deg); }
.speaker-tile.is-active .speaker-tile-more { transform: rotate(45deg); }

/* Bulle de description partagée, sous la grille. */
.speaker-bubble {
    margin-top: 0.25rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--app-radius-sm);
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--app-accent) 18%, transparent);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    position: relative;
    animation: bubble-in 180ms ease;
}
/* Petite flèche pointant vers la grille. */
.speaker-bubble::before {
    content: "";
    position: absolute;
    top: -9px;
    left: clamp(1.25rem, var(--speaker-bubble-arrow-left, 2rem), calc(100% - 1.25rem));
    width: 16px;
    height: 16px;
    background: #fff;
    border-left: 1px solid color-mix(in srgb, var(--app-accent) 18%, transparent);
    border-top: 1px solid color-mix(in srgb, var(--app-accent) 18%, transparent);
    transform: rotate(45deg);
}
.speaker-bubble-name { margin-bottom: 0.1rem; }
.speaker-bubble-role { color: var(--app-accent); font-weight: 600; margin-bottom: 0.6rem; }
.speaker-bubble-desc { color: var(--app-text); }

@media (max-width: 700px) {
    .speaker-bubble {
        grid-column: 1 / -1;
        margin-top: 0;
    }
}

@keyframes bubble-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
}

/* Liens photos ------------------------------------------------------------- */
.photo-link-card .link-arrow {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--app-accent);
    font-weight: 700;
}

/* Réseaux sociaux ---------------------------------------------------------- */
.social-links {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.social-links a {
    display: inline-block;
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--app-accent) 12%, transparent);
    text-decoration: none;
    font-weight: 600;
    color: var(--app-text);
}
.social-links a:hover { background: color-mix(in srgb, var(--app-accent) 22%, transparent); }

/* Carte -------------------------------------------------------------------- */
.map-embed iframe {
    width: 100%;
    height: 360px;
    border: 0;
    border-radius: var(--app-radius-sm);
}
.map-link { margin-top: 0.5rem; font-size: 0.9rem; }

/* Pied de page ------------------------------------------------------------- */
.public-footer {
    text-align: center;
    padding: 2rem 0 0;
    color: color-mix(in srgb, var(--app-text) 55%, transparent);
    font-size: 0.9rem;
}

.contact-card a { color: var(--app-accent); }
