/* ========== Overlay detail ========== */

.overlay-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: 16px;
    justify-content: space-between;
}

.overlay-close {
    font-size: 1.5rem;
    line-height: 1;
    padding: 4px 10px;
    min-width: var(--touch-target, 44px);
    min-height: var(--touch-target, 44px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.overlay-header h1 {
    font-size: 1.15rem;
}

#detail-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: var(--space-4);
}

/* Sections en cadres séparés (mockup style : bg + border + radius + padding) */
.detail-section {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 3px;
    margin-bottom: 8px;
    padding: 14px 16px;
    overflow: hidden;
}
.detail-section:last-child {
    margin-bottom: 0;
}

/* Data rows (Informations détaillées : key gauche / value droite, border bottoms) */
.data-rows { display: flex; flex-direction: column; gap: 1px; margin-top: 4px; }
.data-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.78rem;
}
.data-row:last-child { border-bottom: none; }
.data-key { color: var(--text-muted); flex-shrink: 0; }
.data-val { color: var(--text-primary); font-weight: 500; text-align: right; }

/* Saison caption (sous la SVG) */
.season-caption {
    margin-top: 12px;
    padding-top: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Description : typo cohérente avec data-val (Informations détaillées) */
.detail-description-text {
    font-size: 0.78rem;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.6;
    margin: 0;
}
.detail-description-source {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-style: italic;
    margin: 8px 0 0;
}
/* Tonight-section garde son gradient violet (override) */
details.detail-section.tonight-section {
    padding: 14px 16px;
    margin-bottom: 8px;
}

.detail-section h2 {
    font-size: 0.95rem;
    color: var(--accent);
    margin-bottom: 8px;
}

/* Header de section avec badges à droite (ex: CHAMP & ORIENTATION + Aladin/DSS2) */
.detail-section-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.detail-section-title-row > span:first-child {
    flex: 1;
}

/* ========== Fiche détail v2 — Hero stylisé (mockup mockup-detail-briefing-v2-m27) ========== */
/* Override le legacy .screen.overlay (padding+max-width+bg+blur) — spécificité doublée */
.screen.overlay.screen-detail-v2 {
    padding: 0;
    max-width: 100%;
    background: var(--bg-primary);
    backdrop-filter: none;
}
/* Cacher le topbar quand la fiche détail est ouverte (mockup = pas de topbar visible) */
body:has(.screen.overlay.screen-detail-v2.active) #topbar,
body:has(.screen.overlay.screen-detail-v2.active) #bottombar {
    display: none;
}
/* Override le legacy .screen.overlay #detail-content (bg+border+padding+max-width 800px → 630px) */
.screen.overlay.screen-detail-v2 #detail-content {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0 14px 80px;
    max-width: 630px;
    margin: 0 auto;
}
@media (min-width: 600px) {
    .screen.overlay.screen-detail-v2 #detail-content {
        padding: 0 20px 80px;
    }
}

/* Hero */
.hero {
    position: relative;
    height: 85px;
    overflow: hidden;
    background: #06040f;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 90% at 65% 35%, rgba(80, 176, 224, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse 50% 70% at 30% 50%, rgba(123, 95, 231, 0.22) 0%, transparent 60%),
        radial-gradient(ellipse 100% 60% at 50% 100%, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
}
.hero-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
    width: 100%;
    height: 100%;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.55) 60%, rgba(10, 10, 15, 1) 100%);
    pointer-events: none;
}
.hero-close {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    padding: 0;
    margin-left: auto;
    margin-right: 14px;
    flex-shrink: 0;
}
@media (min-width: 600px) {
    .hero-close { margin-right: 20px; }
}
.hero-close:hover { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: rgba(255, 255, 255, 0.25); }
.hero-close svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; }

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 14px 8px;
    z-index: 10;
}
.hero-content-inner {
    max-width: 630px;
    margin: 0 auto;
    padding: 0 0 0 24px;
}
.hero-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2px;
}
.hero-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.3rem, 5vw, 1.9rem);
    font-weight: 700;
    color: #a890f0;
    line-height: 1.1;
    margin: 0;
    text-shadow: 0 2px 16px rgba(123, 95, 231, 0.35);
    letter-spacing: 0.02em;
}
.hero-fav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s, transform 0.15s, filter 0.2s;
    flex-shrink: 0;
}
.hero-fav:hover { color: var(--accent); transform: scale(1.12); }
.hero-fav[data-fav="true"] {
    color: var(--accent);
    filter: drop-shadow(0 0 6px rgba(123, 95, 231, 0.7));
}
.hero-fav svg { width: 26px; height: 26px; }
.hero-subtitle {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
    font-style: italic;
    margin: 0 0 10px;
    letter-spacing: 0.01em;
    line-height: 1.4;
}
.hero-subtitle:empty { display: none; }
.hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

@media (min-width: 600px) {
    .hero { height: 140px; }
    .hero-content { padding: 0 20px 20px; }
    .hero-title { font-size: 2em; }
    .detail-content-wrap { padding: 0 20px 80px; }
}

/* ========== Section CE SOIR (mockup-style) ========== */
/* Tonight-section : gradient violet + box-shadow (signature visuelle) */
details.detail-section.tonight-section {
    background: linear-gradient(145deg, rgba(26, 26, 42, 0.99) 0%, rgba(16, 10, 36, 0.99) 100%);
    border: 1px solid rgba(123, 95, 231, 0.14);
    border-radius: 3px;
    padding: 12px 18px;
    box-shadow: 0 6px 32px rgba(0, 0, 0, 0.45);
    position: relative;
    overflow: hidden;
    margin-bottom: 14px;
}
details.detail-section.tonight-section::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(123, 95, 231, 0.06) 0%, transparent 70%);
    pointer-events: none;
}
details.detail-section.tonight-section > summary {
    color: #a890f0;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
details.detail-section.tonight-section > summary::after {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><polyline points='4 6 8 10 12 6' fill='none' stroke='%23a890f0' stroke-width='1.8' stroke-linecap='round'/></svg>");
}
@media (max-width: 600px) {
    details.detail-section.tonight-section {
        padding: 10px 12px;
        margin-bottom: 8px;
    }
    details.detail-section.tonight-section > summary {
        font-size: 0.55rem;
        padding: 0 0 8px;
    }
}

.tonight-row {
    display: grid;
    grid-template-columns: 0.7fr 1fr 1fr 1fr 1.5fr;
    gap: 8px;
    align-items: stretch;
}
.tonight-row.no-cadrage {
    grid-template-columns: repeat(4, 1fr);
    max-width: 480px;
    margin: 0 auto;
}
@media (max-width: 600px) {
    .tonight-row {
        grid-template-columns: 0.75fr 1fr 1fr 1fr 1.4fr;
        gap: 5px;
    }
    .tonight-row.no-cadrage {
        grid-template-columns: repeat(4, 1fr);
        max-width: none;
    }
    .ts-card {
        padding: 8px 4px;
        min-height: 80px;
    }
    .ts-event {
        font-size: 0.5rem;
        margin-bottom: 2px;
    }
    .ts-time {
        font-size: 0.7rem;
    }
    .ts-sub {
        font-size: 0.5rem;
        margin-top: 1px;
    }
    .score-big {
        font-size: 1.7rem;
    }
    .score-card .score-hint {
        font-size: 0.48rem;
    }
    .cadrage-card-inner {
        flex-direction: column;
        gap: 2px;
    }
    .cadrage-card-inner svg {
        width: 56px;
        height: 38px;
    }
    .cadrage-card-inner .ts-time {
        order: 1;
        font-size: 0.62rem;
    }
}

.ts-card {
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--border-subtle);
    border-radius: 3px;
    padding: 10px 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100px;
}
/* Pattern mockup verbatim : ts-event en haut, dernier en bas-milieu, ts-time aligné par margin auto */
.ts-card > *:nth-child(2) { margin-top: auto; }
.ts-card > *:last-child { margin-bottom: auto; }

.ts-event {
    font-size: 0.58rem;
    color: var(--text-muted);
    letter-spacing: 0.07em;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.ts-time {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.ts-sub {
    font-family: 'Inter', sans-serif;
    font-size: 0.62rem;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.2;
}

.dur-bars-row { margin: 4px 0 2px; line-height: 1; }
.dur-bars-row .dur-bars { margin-left: 0; }

/* Score card avec gros chiffre central */
.score-card {
    cursor: pointer;
    transition: background 0.15s;
}
.score-card:hover { background: rgba(255, 255, 255, 0.04); }
.score-big {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
    margin-top: 2px;
}
.score-card .score-hint {
    margin-top: 4px;
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
}

/* Cadrage card avec % + mini SVG cible-cadre */
.cadrage-card-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 2px;
}
.cadrage-card-inner svg { flex-shrink: 0; }

/* Moon strip compact sous les 5 cards */
.moon-strip {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
    padding: 4px 4px 0;
}
.moon-strip-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.moon-strip-data {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px 14px;
}
@media (max-width: 600px) {
    .moon-strip {
        gap: 10px;
        margin-top: 10px;
        padding: 4px 4px 0;
    }
    .moon-strip-icon svg {
        width: 36px;
        height: 36px;
    }
    .moon-strip-data {
        grid-template-columns: repeat(3, 1fr);
        gap: 3px 10px;
    }
    .moon-strip-label {
        font-size: 0.58rem;
    }
    .moon-strip-value {
        font-size: 0.62rem;
    }
}
.moon-strip-cell {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.moon-strip-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.62rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}
.moon-strip-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

/* Summary CE SOIR : titre + card-int badge à droite */
.summary-title-row {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

/* ========== Stratégie de poses (pose-line LRGB/SHO) ========== */
.strategy-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.pose-lines { display: flex; flex-direction: column; gap: 5px; }
.pose-line {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    border: 1px solid var(--border-subtle);
}
.ch-label {
    font-weight: 700;
    font-size: 0.7rem;
    font-family: 'Orbitron', sans-serif;
    min-width: 36px;
}
.ch-lum { color: #d8d4c8; }
.ch-r   { color: #d86060; }
.ch-g   { color: #60c860; }
.ch-b   { color: #6090d8; }
.ch-ha  { color: var(--color-ha); }
.ch-oiii{ color: var(--color-oiii); }
.ch-sii { color: var(--color-sii); }
.pose-count {
    font-size: 0.75rem;
    color: var(--text-primary);
    font-family: 'Orbitron', sans-serif;
    white-space: nowrap;
}
.pose-bar-wrap {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
}
.pose-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.pose-bar-lum  { background: rgba(210, 200, 180, 0.8); }
.pose-bar-r    { background: rgba(216, 96, 96, 0.8); }
.pose-bar-g    { background: rgba(96, 200, 96, 0.8); }
.pose-bar-b    { background: rgba(96, 144, 216, 0.8); }
.pose-bar-ha   { background: var(--color-ha); opacity: 0.85; }
.pose-bar-oiii { background: var(--color-oiii); opacity: 0.85; }
.pose-bar-sii  { background: var(--color-sii); opacity: 0.85; }
.pose-total {
    font-size: 0.65rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.strategy-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ========== Composition spectrale (source header + emission-lines + sources légende) ========== */
.comp-source-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    padding: 10px 12px;
    background: rgba(217, 168, 74, 0.06);
    border: 1px solid rgba(217, 168, 74, 0.22);
    border-radius: 3px;
}
.comp-source-header.source-acker { background: rgba(62, 207, 142, 0.06); border-color: rgba(62, 207, 142, 0.22); }
.comp-source-badge-big {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #5a5a7a;
    border-radius: 50%;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: #c0c0d0;
}
.comp-source-header.source-acker .comp-source-badge-big {
    background: #3ecf8e;
    color: #0a1a0f;
    box-shadow: 0 0 10px rgba(62, 207, 142, 0.4);
}
.comp-source-info { flex: 1; min-width: 0; }
.comp-source-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--warning);
    margin-bottom: 2px;
}
.comp-source-header.source-acker .comp-source-title { color: #3ecf8e; }
.comp-source-sub { font-size: 0.68rem; color: var(--text-muted); }

.comp-data-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(217, 168, 74, 0.06);
    border: 1px solid rgba(217, 168, 74, 0.15);
    border-radius: 3px;
    margin-bottom: 12px;
    font-size: 0.72rem;
    color: var(--warning);
}
.comp-data-alert-icon {
    font-size: 1rem;
    flex-shrink: 0;
    line-height: 1;
}

.emission-lines {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}
.emission-line {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.04);
}
.em-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 40px;
}
.em-wavelength {
    font-size: 0.65rem;
    color: var(--text-muted);
}
.em-source-badge {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: help;
    position: relative;
}
.source-pip {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.58rem;
    font-weight: 700;
    transition: transform 0.15s;
}
.source-pip:hover { transform: scale(1.15); }
.source-pip-acker { background: #3ecf8e; color: #0a1a0f; }
.source-pip-mrao  { background: #d94a4a; color: #fff; }
.source-pip-mash  { background: #8a4ad9; color: #fff; }
.source-pip-shar  { background: #d9a84a; color: #0a0a0f; }
.source-pip-wiki  { background: #4a4a5a; color: #9090a8; border: 1px solid rgba(255, 255, 255, 0.08); }
.source-label {
    font-size: 0.63rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.comp-enrich-invite {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.comp-legend {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
}
.comp-legend-title {
    font-size: 0.6rem;
    font-family: 'Orbitron', sans-serif;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-bottom: 8px;
    text-transform: uppercase;
}
.legend-items { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.63rem;
    color: var(--text-muted);
}
.legend-pip {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.52rem;
    font-weight: 700;
}

/* ========== Liens externes (footer fiche détail) ========== */
.external-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
    padding: 0 4px;
}
.ext-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 500;
    padding: 5px 11px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ext-link:hover {
    background: rgba(123, 95, 231, 0.15);
    color: var(--accent-hover);
    border-color: rgba(123, 95, 231, 0.4);
}

/* Sections fiche détail en accordéon (open par défaut) */
details.detail-section > summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 12px;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.15s;
}
details.detail-section > summary::-webkit-details-marker { display: none; }
details.detail-section > summary:hover { opacity: 0.85; }
details.detail-section > summary::after {
    content: '';
    width: 13px;
    height: 13px;
    margin-left: auto;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><polyline points='4 6 8 10 12 6' fill='none' stroke='%237B5FE7' stroke-width='1.8' stroke-linecap='round'/></svg>");
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.2s;
    flex-shrink: 0;
}
details.detail-section[open] > summary::after { transform: rotate(180deg); }
/* Summary qui contient un title-row (badges Aladin/DSS2 etc.) garde son flex naturel */
details.detail-section > summary.detail-section-title-row > span:first-child,
details.detail-section > summary > .summary-title-row > span:first-child {
    flex: 1;
}

.detail-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px var(--space-3);
    font-size: 0.88rem;
}

.detail-grid dt {
    color: var(--text-secondary);
}

.detail-grid dd {
    color: var(--text-primary);
    font-weight: 500;
}

/* Courbe d'altitude */

.alt-curve-wrap {
    margin-bottom: 10px;
}

.alt-curve-svg {
    width: 100%;
    height: auto;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
}

.alt-curve-legend {
    display: flex;
    justify-content: center;
    gap: 14px;
    font-size: 0.68rem;
    color: var(--text-muted);
}

.alt-legend-green {
    color: #4caf50;
}

.alt-legend-red {
    color: #ff5555;
}

.alt-legend-line {
    color: var(--accent);
}

.alt-legend-moon {
    color: #ffdc64;
}

#aladin-container {
    width: 100%;
    height: 300px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

/* Masquer par défaut le box des coordonnées Aladin (trop encombrant) */
#aladin-container .aladin-location {
    display: none !important;
}

/* Section "Guidage intégré" (formulaire capteur — accordéon) */
.guide-section {
    margin-top: 14px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 0;
    background: rgba(255, 255, 255, 0.02);
}
.guide-section[open] {
    padding-bottom: 10px;
}
.guide-section-summary {
    list-style: none;
    cursor: pointer;
    padding: 10px 14px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    position: relative;
    user-select: none;
}
.guide-section-summary::-webkit-details-marker {
    display: none;
}
.guide-section-summary::before {
    content: '▶';
    font-size: 0.7rem;
    margin-right: 8px;
    transition: transform 0.2s;
    display: inline-block;
    color: var(--accent);
}
.guide-section[open] .guide-section-summary::before {
    transform: rotate(90deg);
}
.guide-section-body {
    padding: 0 14px;
}
.guide-section-body input[readonly] {
    opacity: 0.55;
    cursor: default;
    background: rgba(255, 255, 255, 0.02) !important;
}
.guide-section-body .guide-editable select,
.guide-section-body .guide-editable input {
    border-color: var(--accent) !important;
}
.guide-edit-hint {
    font-weight: 400;
    font-size: 0.7rem;
    color: var(--accent);
    margin-left: 4px;
}

/* Masquer les contrôles Aladin non voulus */
#aladin-container .aladin-fov,
#aladin-container .aladin-fovDiv,
#aladin-container .aladin-zoomControl,
#aladin-container .aladin-projection-control,
#aladin-container .aladin-stack-control,
#aladin-container .aladin-layersControl-container,
#aladin-container .aladin-simbadPointerControl,
#aladin-container .aladin-cooGridControl {
    display: none !important;
}
/* Bouton fullscreen custom (accent theme) */
.aladin-fs-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 20;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid var(--accent);
    border-radius: 6px;
    color: var(--accent);
    cursor: pointer;
    padding: 0;
    transition: background 0.15s, color 0.15s;
}
.aladin-fs-btn svg { width: 18px; height: 18px; }
.aladin-fs-btn:hover {
    background: var(--accent);
    color: #fff;
}

.aladin-viewer-wrap {
    position: relative;
    margin-bottom: 0;
}

/* Rotation Aladin : barre HORIZONTALE 0-180° sous la preview, avec viseur recenter à gauche */
.aladin-rotation-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 0;
}
.aladin-rotation-label-block {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.1;
    flex-shrink: 0;
}
.aladin-rotation-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}
.aladin-rotation-sub {
    font-size: 0.62rem;
    color: var(--text-muted);
    font-style: italic;
}
.aladin-rotation-slider {
    flex: 1;
    height: 4px;
    accent-color: var(--accent);
    cursor: ew-resize;
    margin: 0;
}
.aladin-rotation-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    min-width: 50px;
    text-align: right;
    flex-shrink: 0;
}
/* Override : .aladin-recenter-btn n'est plus en absolute, c'est inline dans la rotation-control */
.aladin-rotation-control .aladin-recenter-btn {
    position: static;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.aladin-fov-label {
    position: absolute;
    left: 8px;
    bottom: 8px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.6);
    color: var(--accent);
    border-radius: 3px;
    font-size: 0.7rem;
    font-variant-numeric: tabular-nums;
    backdrop-filter: blur(4px);
    pointer-events: none;
    z-index: 10;
    max-width: calc(100% - 50px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aladin-recenter-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: var(--accent);
    border: 1px solid var(--accent);
    backdrop-filter: blur(4px);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.15s;
}
.aladin-recenter-btn:hover {
    background: rgba(168, 85, 247, 0.25);
}
