/* ============================================================
   trajectoires-demo.css — page /trajectoires-demo
   Funnel : recherche EPCI (gratuit, mailto) + RDV démo (mailto).
   Spécifique à cette page (cf. AGENTS.md § Versioning).
   ============================================================ */

/* ── HERO ─────────────────────────────────────────────────── */
.demo-hero {
    padding: 11rem 2rem 4rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    position: relative;
    overflow: hidden;
}

.demo-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 35%, rgba(53, 152, 192, 0.18), transparent 45%),
        radial-gradient(circle at 80% 65%, rgba(121, 167, 155, 0.14), transparent 50%);
    pointer-events: none;
}

.demo-hero-inner {
    max-width: 820px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.demo-hero-kicker {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--accent-data);
    margin-bottom: 1.25rem;
}

.demo-hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 900;
    color: white;
    line-height: 1.2;
    margin-bottom: 1.25rem;
}

.demo-hero h1 .accent {
    background: linear-gradient(135deg, var(--accent-data), var(--accent-territory));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.demo-hero p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    max-width: 620px;
}

/* ── BRANCHE A — RECHERCHE EPCI ───────────────────────────── */
.demo-section {
    padding: 4rem 2rem;
}

.demo-section-inner {
    max-width: 760px;
    margin: 0 auto;
}

.demo-step-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent-territory);
    margin-bottom: 0.85rem;
}

.demo-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-territory);
    color: white;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0;
}

.demo-section h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.3rem, 2.6vw, 1.8rem);
    font-weight: 800;
    color: var(--primary);
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.demo-section-desc {
    font-size: 1.02rem;
    line-height: 1.7;
    color: var(--secondary);
    margin-bottom: 2.25rem;
    max-width: 580px;
}

/* Carte de recherche */
.demo-search-card {
    background: white;
    border-radius: 18px;
    padding: 2.5rem 2.5rem 2.5rem;
    box-shadow:
        0 2px 4px rgba(14, 62, 73, 0.04),
        0 8px 32px rgba(14, 62, 73, 0.10);
    border: 1px solid rgba(53, 152, 192, 0.10);
    /* Quand les suggestions sont ouvertes, réserve l'espace */
    transition: padding-bottom 0.15s ease;
}

/* Les suggestions (forms.css) sont en position:absolute ; elles débordent
   de la carte. On pousse le contenu qui suit via un padding-bottom dynamique. */
.demo-search-card.suggesting {
    padding-bottom: calc(2.5rem + 300px);
}

/* Panneau résultat EPCI sélectionné */
.demo-result {
    margin-top: 1.5rem;
    display: none;
}

.demo-result.visible {
    display: block;
}

.demo-result-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 14px;
    padding: 1.75rem 2rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.demo-result-card::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -5%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(53, 152, 192, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.demo-result-nom {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    position: relative;
}

.demo-result-meta {
    font-size: 0.82rem;
    opacity: 0.7;
    margin-bottom: 1.25rem;
    position: relative;
}

.demo-result-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    position: relative;
}

.demo-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.4rem;
    border-radius: 10px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
}

.demo-btn--primary {
    background: linear-gradient(135deg, var(--accent-data), var(--accent-territory));
    color: white;
    box-shadow: 0 6px 18px rgba(53, 152, 192, 0.25);
}

.demo-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(53, 152, 192, 0.35);
}

.demo-btn--ghost {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.demo-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.14);
}

/* Note sous la recherche */
.demo-note {
    margin-top: 1.25rem;
    font-size: 0.8rem;
    color: rgba(14, 62, 73, 0.5);
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.demo-note svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--accent-territory);
}

/* ── SÉPARATEUR ENTRE LES DEUX BRANCHES ────────────────────── */
.demo-divider {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.demo-divider::before,
.demo-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(14, 62, 73, 0.1);
}

.demo-divider span {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent-territory);
}

/* ── BRANCHE B — RDV ──────────────────────────────────────── */
.demo-rdv-card {
    background: white;
    border-radius: 18px;
    padding: 2.5rem;
    box-shadow:
        0 2px 4px rgba(14, 62, 73, 0.04),
        0 8px 32px rgba(14, 62, 73, 0.08);
    border: 1px solid rgba(53, 152, 192, 0.10);
}

.demo-rdv-card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.demo-rdv-card p {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--secondary);
    margin-bottom: 1.5rem;
}

.demo-rdv-preview {
    background: var(--bg-main);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.86rem;
    line-height: 1.7;
    color: var(--secondary);
    border-left: 3px solid var(--accent-territory);
}

.demo-rdv-preview .preview-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-territory);
    margin-bottom: 0.5rem;
}

.demo-rdv-preview strong {
    color: var(--primary);
    font-weight: 600;
}

/* ── TEASER CONTENU ───────────────────────────────────────── */
.demo-teaser {
    background: var(--bg-main);
    padding: 4rem 2rem;
}

.demo-teaser-inner {
    max-width: 900px;
    margin: 0 auto;
}

.demo-teaser-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 2rem;
}

.demo-teaser-card {
    background: white;
    border: 1px solid rgba(14, 62, 73, 0.08);
    border-radius: 12px;
    padding: 1.75rem;
}

.demo-teaser-card .icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent-data), var(--accent-territory));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.demo-teaser-card .icon svg {
    width: 18px;
    height: 18px;
    stroke: white;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.demo-teaser-card h4 {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.demo-teaser-card p {
    font-size: 0.86rem;
    line-height: 1.6;
    color: var(--secondary);
}

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 900px) {
    .demo-teaser-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .demo-hero { padding: 9rem 1.5rem 3rem; }
    .demo-section { padding: 3rem 1.5rem; }
    .demo-search-card,
    .demo-rdv-card { padding: 1.75rem 1.5rem; }
    .demo-teaser { padding: 3rem 1.5rem; }
}