/**
 * AstroAlma - Styles
 * Version 6.1 - Police Ubuntu + Slider toggle + Sans gris
 */

/* Import Google Fonts - Ubuntu */
@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@400;500;700&display=swap');

/* Animation pulse pour le bouton de téléchargement prêt */
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
    50% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

.ready-download {
    background: #4CAF50 !important;
    animation: pulse 1.5s infinite !important;
    font-weight: bold !important;
}

/* === Variables === */
:root {
    --astro-primary: #5c6bc0;
    --astro-primary-dark: #3f51b5;
    --astro-secondary: #7e57c2;
    --astro-accent: #26a69a;
    --astro-success: #43a047;
    --astro-error: #e53935;
    --astro-bg: #fafafa;
    --astro-card: #ffffff;
    --astro-text: #2c3e50;
    --astro-text-light: #2c3e50; /* Plus de gris, même couleur que text */
    --astro-border: #dde1e5;
    --astro-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --astro-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.1);
    --astro-radius: 12px;
    --astro-radius-sm: 8px;
    
    /* Tailles de police - COMPACTES */
    --font-size-base: 15px;
    --font-size-lg: 17px;
    --font-size-xl: 20px;
    --font-size-2xl: 26px;
    --font-size-sm: 14px;
    --font-size-xs: 12px;
}

/* === Reset et base === */
.astroalma-container * {
    box-sizing: border-box;
}

/* === Container principal === */
.astroalma-container {
    max-width: 680px;
    margin: 1.5rem auto;
    padding: 0 1rem;
    font-family: 'Ubuntu', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: var(--font-size-base);
    line-height: 1.5;
    color: var(--astro-text);
}

/* === Header === */
.astroalma-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.astroalma-title {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(135deg, var(--astro-primary), var(--astro-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.astroalma-subtitle {
    color: var(--astro-text-light);
    margin: 0;
    font-size: var(--font-size-sm);
}

/* === Formulaire === */
.astroalma-form {
    background: transparent;
    border-radius: var(--astro-radius);
    overflow: hidden;
}

/* === Profil === */
.astroalma-profil {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--astro-border);
}

.astroalma-profil:last-child {
    border-bottom: none;
}

.profil-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.profil-number {
    font-weight: 600;
    color: var(--astro-primary);
    font-size: var(--font-size-base);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profil-remove {
    background: none;
    border: 1px solid var(--astro-error);
    color: var(--astro-error);
    cursor: pointer;
    font-size: var(--font-size-sm);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.profil-remove:hover {
    background: var(--astro-error);
    color: white;
}

/* === Champs === */
.profil-fields {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

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

.field-group label {
    font-weight: 500;
    font-size: var(--font-size-sm);
    color: var(--astro-text);
}

.field-required {
    color: var(--astro-error);
    margin-left: 2px;
}

.field-hint {
    font-weight: 400;
    font-size: var(--font-size-xs);
    color: var(--astro-text-light);
}

.field-group input,
.field-group select {
    padding: 0.6rem 0.875rem;
    border: 1px solid var(--astro-border);
    border-radius: var(--astro-radius-sm);
    font-size: var(--font-size-sm);
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--astro-card);
}

.field-group input:focus,
.field-group select:focus {
    outline: none;
    border-color: var(--astro-primary);
    box-shadow: 0 0 0 2px rgba(92, 107, 192, 0.12);
}

.field-group input.error,
.field-group input.field-error {
    border-color: var(--astro-error);
    background-color: rgba(239, 68, 68, 0.05);
}

.field-group input.selected {
    border-color: var(--astro-success);
    background-color: rgba(16, 185, 129, 0.05);
}

/* === Groupe optionnel === */
.field-optional-group {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    padding: 1.25rem;
    border-radius: var(--astro-radius-sm);
    border: 1px dashed var(--astro-border);
}

.optional-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.optional-label {
    font-weight: 600;
    color: var(--astro-secondary);
    font-size: var(--font-size-base);
}

.optional-badge {
    background: var(--astro-secondary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.optional-hint {
    color: var(--astro-text-light);
    font-size: var(--font-size-sm);
    margin: 0 0 1rem 0;
}

/* === Autocomplete ville === */
.city-autocomplete-wrapper {
    position: relative;
}

.city-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--astro-card);
    border: 2px solid var(--astro-primary);
    border-top: none;
    border-radius: 0 0 var(--astro-radius-sm) var(--astro-radius-sm);
    box-shadow: var(--astro-shadow-lg);
    max-height: 280px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.city-suggestion {
    padding: 1rem 1.25rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--astro-border);
    transition: background 0.15s;
    font-size: var(--font-size-base);
}

.city-suggestion:last-child {
    border-bottom: none;
}

.city-suggestion:hover,
.city-suggestion.active {
    background: rgba(99, 102, 241, 0.1);
}

.city-name-display {
    font-weight: 600;
}

.city-country {
    font-size: var(--font-size-sm);
    color: var(--astro-text-light);
}

.city-loading,
.city-no-result,
.city-error {
    padding: 1.25rem;
    text-align: center;
    color: var(--astro-text-light);
    font-size: var(--font-size-base);
}

.city-error {
    color: var(--astro-error);
}

/* === Boutons === */
.astroalma-actions,
.astroalma-actions-secondary {
    padding: 2rem;
    text-align: center;
}

.astroalma-actions-secondary {
    padding-top: 0;
}

.btn-primary,
.btn-secondary {
    padding: 1.125rem 2.5rem;
    border: none;
    border-radius: var(--astro-radius-sm);
    font-size: var(--font-size-lg);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--astro-primary), var(--astro-secondary));
    color: white;
    width: 100%;
    max-width: 400px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--astro-bg);
    color: var(--astro-primary);
    border: 2px solid var(--astro-border);
    font-size: var(--font-size-base);
}

.btn-secondary:hover {
    background: var(--astro-border);
    border-color: var(--astro-primary);
}

/* === Loading === */
.astroalma-loading {
    background: var(--astro-card);
    border-radius: var(--astro-radius);
    box-shadow: var(--astro-shadow-lg);
    padding: 5rem 2rem;
    text-align: center;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.loading-spinner {
    width: 70px;
    height: 70px;
    border: 5px solid var(--astro-border);
    border-top-color: var(--astro-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--astro-text);
    margin: 0;
}

.loading-subtext {
    color: var(--astro-text-light);
    margin: 0;
    font-size: var(--font-size-base);
}

/* === Résultat === */
.astroalma-result {
    background: var(--astro-card);
    border-radius: var(--astro-radius);
    box-shadow: var(--astro-shadow-lg);
    overflow: hidden;
}

.result-header {
    background: linear-gradient(135deg, var(--astro-primary), var(--astro-secondary));
    color: white;
    padding: 2rem;
    text-align: center;
}

.result-header h3 {
    margin: 0;
    font-size: var(--font-size-xl);
}

.result-content {
    padding: 2.5rem;
    line-height: 1.8;
    font-size: var(--font-size-base) !important;
}

/* Forcer la taille de police sur TOUS les éléments du résultat */
.result-content,
.result-content * {
    font-size: inherit;
}

.result-content div,
.result-content p,
.result-content span,
.result-content li,
.result-content ul,
.result-content ol {
    font-size: var(--font-size-base) !important;
    line-height: 1.8;
}

.result-content h3 {
    color: var(--astro-primary);
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    font-size: var(--font-size-xl) !important;
    border-bottom: 3px solid var(--astro-border);
    padding-bottom: 0.75rem;
}

.result-content h3:first-child {
    margin-top: 0;
}

.result-content h4 {
    color: var(--astro-secondary);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: var(--font-size-lg) !important;
}

.result-content p {
    margin: 0 0 1.25rem 0;
    text-align: justify;
}

.result-content strong {
    color: var(--astro-primary);
}

/* Reset des styles inline potentiellement générés par l'IA */
.result-content [style] {
    font-size: var(--font-size-base) !important;
}

.result-actions {
    padding: 2rem;
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    border-top: 2px solid var(--astro-border);
    flex-wrap: wrap;
}

/* === Erreur === */
.astroalma-error {
    background: var(--astro-card);
    border-radius: var(--astro-radius);
    box-shadow: var(--astro-shadow-lg);
    padding: 4rem 2rem;
    text-align: center;
}

.error-icon {
    font-size: 4rem;
    margin: 0 0 1.5rem 0;
}

.error-message {
    color: var(--astro-error);
    font-size: var(--font-size-lg);
    margin: 0 0 2rem 0;
}

/* === Responsive === */
@media (max-width: 768px) {
    :root {
        --font-size-base: 16px;
        --font-size-lg: 18px;
        --font-size-xl: 22px;
        --font-size-2xl: 28px;
        --font-size-sm: 14px;
        --font-size-xs: 12px;
    }
    
    .astroalma-container {
        margin: 1rem auto;
        padding: 0 1rem;
    }
    
    .astroalma-profil {
        padding: 1.5rem;
    }

    .field-row {
        grid-template-columns: 1fr;
    }

    .result-content {
        padding: 1.5rem;
    }

    .result-actions {
        flex-direction: column;
    }

    .result-actions .btn-secondary {
        width: 100%;
    }
    
    .optional-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* === Large screens === */
@media (min-width: 1200px) {
    :root {
        --font-size-base: 19px;
        --font-size-lg: 22px;
        --font-size-xl: 26px;
        --font-size-2xl: 36px;
    }
    
    .astroalma-container {
        max-width: 900px;
    }
    
    .result-content {
        padding: 3rem;
    }
}

/* === Upsell Premium === */
.result-upsell {
    margin-top: 2rem;
    background: linear-gradient(135deg, #f6f0ff 0%, #fff0f5 100%);
    border: 2px dashed var(--astro-primary);
    border-radius: var(--astro-radius);
    padding: 2rem;
    text-align: center;
}

.upsell-content h4 {
    color: var(--astro-primary);
    font-size: var(--font-size-xl);
    margin-bottom: 1rem;
}

.upsell-content p {
    color: var(--astro-text);
    margin-bottom: 1rem;
}

.upsell-content ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    text-align: left;
    display: inline-block;
}

.upsell-content li {
    padding: 0.5rem 0;
    color: var(--astro-text);
    font-size: var(--font-size-base);
}

.btn-upsell {
    display: inline-block;
    background: linear-gradient(135deg, var(--astro-primary), var(--astro-secondary));
    color: #fff !important;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: var(--font-size-lg);
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-upsell:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-upsell-secondary {
    display: inline-block;
    background: #fff;
    color: var(--astro-primary) !important;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: var(--font-size-base);
    text-decoration: none;
    border: 2px solid var(--astro-primary);
    transition: all 0.2s;
}

.btn-upsell-secondary:hover {
    background: var(--astro-primary);
    color: #fff !important;
}

.upsell-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* Mode aperçu */
.preview-mode .result-content {
    position: relative;
}

.preview-mode .result-content::after {
    content: "APERÇU GRATUIT";
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Données du profil dans l'aperçu */
.profil-data {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.profil-data p {
    margin: 0.5rem 0 !important;
    text-align: left !important;
}

.compat-data {
    background: linear-gradient(135deg, #fff0f5 0%, #f0f5ff 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
}

/* === Auth Required / Buy Credits === */
.astroalma-auth-required,
.astroalma-buy-credits {
    background: var(--astro-card);
    border-radius: var(--astro-radius);
    box-shadow: var(--astro-shadow-lg);
    padding: 3rem;
    text-align: center;
    max-width: 500px;
    margin: 2rem auto;
}

.auth-icon,
.buy-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.astroalma-auth-required h3,
.astroalma-buy-credits h3 {
    font-size: var(--font-size-xl);
    color: var(--astro-text);
    margin-bottom: 1rem;
}

.astroalma-auth-required p,
.astroalma-buy-credits p {
    color: var(--astro-text-light);
    margin-bottom: 2rem;
    font-size: var(--font-size-base);
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.auth-buttons .btn-primary,
.auth-buttons .btn-secondary {
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s;
}

.auth-buttons .btn-primary {
    background: var(--astro-primary);
    color: #fff;
}

.auth-buttons .btn-secondary {
    background: var(--astro-border);
    color: var(--astro-text);
}

/* === PDF Download Button === */
#astroalma-download-pdf {
    text-decoration: none;
}

#astroalma-download-pdf.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* === Print === */
@media print {
    .astroalma-form,
    .astroalma-loading,
    .astroalma-error,
    .result-actions,
    .result-header,
    .result-upsell {
        display: none !important;
    }

    .astroalma-container {
        max-width: 100%;
    }

    .astroalma-result {
        box-shadow: none;
        border: none;
    }

    .result-content {
        padding: 0;
        font-size: 12pt;
    }
    
    .result-content h3 {
        font-size: 16pt;
    }
    
    .result-content h4 {
        font-size: 14pt;
    }
}

/* ========================================
   SÉLECTION TYPE D'ANALYSE - COMPACT & SOBRE
   ======================================== */

.astroalma-type-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

/* ========================================
   SLIDER TOGGLE - Gratuit / Analyse Complète
   ======================================== */

.analysis-toggle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
}

.analysis-toggle {
    display: flex;
    align-items: center;
    background: #e8eaf6;
    border-radius: 30px;
    padding: 4px;
    position: relative;
    width: 100%;
    max-width: 400px;
}

.analysis-toggle-option {
    flex: 1;
    text-align: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    z-index: 2;
    transition: color 0.3s ease;
    font-family: 'Ubuntu', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--astro-text);
    user-select: none;
}

.analysis-toggle-option.active {
    color: #fff;
}

.analysis-toggle-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.analysis-toggle-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    bottom: 4px;
    width: calc(50% - 4px);
    background: linear-gradient(135deg, var(--astro-primary), var(--astro-secondary));
    border-radius: 26px;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(92, 107, 192, 0.4);
}

.analysis-toggle-slider.right {
    left: calc(50% + 0px);
}

.analysis-toggle-price {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    margin-top: 2px;
}

.analysis-toggle-lock {
    display: block;
    font-size: 0.7rem;
    margin-top: 4px;
}

.analysis-toggle-lock a {
    color: inherit;
    text-decoration: underline;
}

.analysis-toggle-option.active .analysis-toggle-lock a {
    color: #fff;
}

/* Responsive */
@media (max-width: 480px) {
    .analysis-toggle {
        max-width: 100%;
    }
    
    .analysis-toggle-option {
        padding: 0.6rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* ========================================
   ANCIENS STYLES BOUTONS (masqués)
   ======================================== */

@media (max-width: 600px) {
    .astroalma-type-selection {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

.type-option {
    display: none; /* Masqué - remplacé par le toggle */
    position: relative;
    background: var(--astro-card);
    border: 2px solid var(--astro-border);
    border-radius: var(--astro-radius-sm);
    padding: 1rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.type-option:hover {
    border-color: var(--astro-primary);
    box-shadow: var(--astro-shadow);
}

.type-option.selected {
    border-color: var(--astro-primary);
    background: rgba(92, 107, 192, 0.06);
    box-shadow: 0 0 0 3px rgba(92, 107, 192, 0.15);
}

.type-option.type-locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.type-option.type-locked:hover {
    transform: none;
    border-color: var(--astro-border);
}

.type-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--astro-accent);
    color: #fff;
    padding: 0.2rem 0.8rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.type-badge-premium {
    background: var(--astro-primary);
}

.type-icon {
    font-size: 1.5rem;
    margin: 0.25rem 0;
    opacity: 0.9;
}

.type-option h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--astro-text);
    margin: 0.25rem 0;
}

.type-option > p {
    color: var(--astro-text);
    font-size: 0.8rem;
    margin: 0.25rem 0 0.5rem 0;
    line-height: 1.3;
}

.type-features {
    display: none; /* Masquer les features pour plus de compacité */
}

.type-price {
    display: inline-block;
    background: var(--astro-bg);
    padding: 0.35rem 1rem;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--astro-primary);
}

.type-lock-message {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #fff8e1;
    border-radius: 6px;
    font-size: 0.75rem;
    color: #f57c00;
}

.type-lock-message a {
    color: var(--astro-primary);
    font-weight: 600;
}

/* Check animation */
.type-option::after {
    content: '✓';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 20px;
    height: 20px;
    background: var(--astro-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

.type-option.selected::after {
    opacity: 1;
    transform: scale(1);
}

/* ═══════════════════════════════════════════════════════════════
   PROFILS SAUVEGARDÉS
   ═══════════════════════════════════════════════════════════════ */

.saved-profiles-selector {
    background: linear-gradient(135deg, #e8f4fd 0%, #d4e9f7 100%);
    border: 2px solid var(--astro-primary);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.saved-profiles-selector::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 20px;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #e8f4fd 0%, #d4e9f7 100%);
    border-left: 2px solid var(--astro-primary);
    border-top: 2px solid var(--astro-primary);
    transform: rotate(45deg);
}

.saved-profiles-label {
    display: block;
    font-weight: 600;
    color: var(--astro-primary);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.saved-profiles-icon {
    margin-right: 0.5rem;
}

.saved-profiles-dropdown {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.saved-profiles-select {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.saved-profiles-select:hover {
    border-color: var(--astro-primary);
}

.saved-profiles-select:focus {
    outline: none;
    border-color: var(--astro-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.saved-profiles-select option {
    padding: 0.5rem;
}

.saved-profiles-clear {
    width: 40px;
    height: 40px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    color: #6c757d;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.saved-profiles-clear:hover {
    border-color: #dc3545;
    color: #dc3545;
    background: #fff5f5;
}

/* Case à cocher sauvegarder */
.save-profile-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 1px dashed #dee2e6;
}

.save-profile-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    flex: 1;
    margin: 0;
    font-size: 0.95rem;
    color: #495057;
}

.save-profile-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--astro-primary);
    cursor: pointer;
}

.save-profile-text {
    user-select: none;
}

.save-profile-label:hover .save-profile-text {
    color: var(--astro-primary);
}

.delete-saved-profile {
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 6px;
    background: #fff;
    color: #dc3545;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #dc3545;
}

.delete-saved-profile:hover {
    background: #dc3545;
    color: #fff;
}

/* Animation quand un profil est chargé */
@keyframes profileLoaded {
    0% { background-color: transparent; }
    50% { background-color: rgba(102, 126, 234, 0.1); }
    100% { background-color: transparent; }
}

.astroalma-profil.profile-loaded {
    animation: profileLoaded 0.5s ease;
}

/* Responsive */
@media (max-width: 576px) {
    .saved-profiles-selector {
        padding: 0.875rem 1rem;
    }
    
    .saved-profiles-dropdown {
        flex-direction: column;
    }
    
    .saved-profiles-select {
        width: 100%;
    }
    
    .saved-profiles-clear {
        width: 100%;
        height: auto;
        padding: 0.5rem;
    }
    
    .save-profile-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .delete-saved-profile {
        width: 100%;
    }
}

/* Animation shake */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* ═══════════════════════════════════════════════════════════════
   MUSIC PLAYER - Lecteur de musique thérapeutique
   ═══════════════════════════════════════════════════════════════ */

/* Container principal du player - sans background foncé */
.music-player {
    background: transparent;
    border-radius: 12px;
    padding: 16px;
    color: var(--astro-text);
}

/* Loading */
.music-loading {
    text-align: center;
    padding: 40px;
}

.music-loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 4px solid rgba(92, 107, 192, 0.2);
    border-top-color: var(--astro-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.music-loading-text {
    margin-top: 16px;
    color: var(--astro-text-light);
    font-size: 14px;
}

/* iOS/Safari Start Overlay */
.ios-start-overlay {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, rgba(92, 107, 192, 0.1) 0%, rgba(156, 39, 176, 0.1) 100%);
    border-radius: 12px;
    margin: 16px 0;
}

.ios-start-content {
    max-width: 300px;
    margin: 0 auto;
}

.ios-start-content p {
    color: var(--astro-text);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.ios-start-btn {
    font-size: 18px !important;
    padding: 16px 32px !important;
    background: linear-gradient(135deg, var(--astro-primary), #9c27b0) !important;
    border: none !important;
    border-radius: 30px !important;
    color: white !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(92, 107, 192, 0.4) !important;
    animation: pulse-ios 2s infinite;
}

.ios-start-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(92, 107, 192, 0.5) !important;
}

.ios-start-btn:active {
    transform: scale(0.98);
}

@keyframes pulse-ios {
    0%, 100% { box-shadow: 0 4px 15px rgba(92, 107, 192, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(156, 39, 176, 0.6); }
}

/* Content */
.music-content {
    display: none;
}

.music-content.visible {
    display: block;
}

/* Controls */
.music-controls {
    background: var(--astro-card);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
    box-shadow: var(--astro-shadow);
}

.music-viz {
    width: 100%;
    height: 50px;
    background: #1a1a2e;
    border-radius: 6px;
    margin-bottom: 12px;
}

.music-seek-container {
    margin-bottom: 12px;
}

.music-seek {
    width: 100%;
    height: 6px;
    cursor: pointer;
    accent-color: var(--astro-primary);
}

.music-time-display {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--astro-text-light);
    margin-top: 4px;
}

/* Note de téléchargement */
.music-download-note {
    margin: 12px 0 0;
    padding: 8px 12px;
    font-size: 0.75em;
    color: var(--astro-text-light);
    background: rgba(0, 0, 0, 0.03);
    border-radius: 6px;
    text-align: center;
    font-style: italic;
}

.music-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0 10px;
}

.music-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.music-btn svg {
    flex-shrink: 0;
}

.music-btn-play {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #e94560, #f39c12);
    color: #fff;
    box-shadow: 0 2px 8px rgba(233, 69, 96, 0.3);
}

.music-btn-play:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 20px rgba(233, 69, 96, 0.5);
}

.music-btn-play:active {
    transform: scale(0.95);
}

.music-btn-stop {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    background: #21262d;
    border: 2px solid #30363d;
    color: #c9d1d9;
}

.music-btn-stop:hover {
    background: #30363d;
    border-color: #e94560;
    color: #e94560;
}

.music-btn-download {
    padding: 10px 16px;
    background: linear-gradient(135deg, #238636 0%, #2ea043 100%);
    border: none;
    color: #fff;
    white-space: nowrap;
    border-radius: 8px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(35, 134, 54, 0.3);
}

.music-btn-download:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(35, 134, 54, 0.4);
}

.music-btn-download:active {
    transform: translateY(0);
}

.music-btn-loop {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    background: #21262d;
    border: 2px solid #30363d;
    color: #c9d1d9;
    transition: all 0.2s ease;
}

.music-btn-loop:hover {
    background: #30363d;
    border-color: #a855f7;
    color: #a855f7;
}

.music-btn-loop.active {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    border-color: #a855f7;
    color: white;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.5);
}

.music-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Boutons désactivés pendant l'export MP3 */
.music-btn.disabled-during-export {
    opacity: 0.4;
    cursor: wait;
    pointer-events: none;
}

/* Download spinner */
.music-btn-download .spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 4px;
}

/* ═══════════════════════════════════════════════════════════════
   MUSIC DIAGNOSTIC - Informations de composition
   ═══════════════════════════════════════════════════════════════ */

/* Header */
.music-diag-header {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--astro-border);
}

.music-diag-title {
    color: var(--astro-primary);
    margin: 0 0 6px;
    font-size: 1.3em;
}

.music-diag-desc {
    color: var(--astro-text-light);
    margin: 0;
    font-size: 13px;
}

.music-diag-benefits {
    color: var(--astro-success);
    margin: 6px 0 0;
    font-size: 12px;
    font-style: italic;
}

/* Badges */
.music-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 16px;
}

.music-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
}

.music-badge-tempo {
    background: rgba(92, 107, 192, 0.15);
    color: var(--astro-primary);
    font-weight: 600;
}

.music-badge-signature {
    background: rgba(126, 87, 194, 0.15);
    color: var(--astro-secondary);
    font-weight: 600;
}

.music-badge-key {
    background: rgba(38, 166, 154, 0.15);
    color: var(--astro-accent);
}

.music-badge-nature {
    background: rgba(67, 160, 71, 0.15);
    color: var(--astro-success);
}

.music-badge-pad {
    background: rgba(243, 156, 18, 0.15);
    color: #f39c12;
}

/* Therapy boxes */
.music-therapy-box {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 3px solid;
}

.music-therapy-box.binaural {
    background: rgba(56, 189, 248, 0.08);
    border-color: #38bdf8;
}

.music-therapy-box.solfege {
    background: rgba(52, 211, 153, 0.08);
    border-color: #34d399;
}

.music-therapy-box.planetaires {
    background: rgba(147, 51, 234, 0.08);
    border-color: #9333ea;
}

.music-therapy-box.chakras {
    background: rgba(240, 136, 62, 0.08);
    border-color: #f0883e;
}

.music-therapy-title {
    margin: 0 0 6px;
    font-size: 0.9em;
}

.music-therapy-title.binaural { color: #0ea5e9; }
.music-therapy-title.solfege { color: #10b981; }
.music-therapy-title.planetaires { color: #8b5cf6; }
.music-therapy-title.chakras { color: #f0883e; }

.music-therapy-warning {
    font-size: 11px;
    color: #f0883e;
    margin-top: 6px;
    padding: 5px 8px;
    background: rgba(240, 136, 62, 0.1);
    border-radius: 4px;
}

.music-therapy-freq {
    margin: 4px 0;
    padding: 6px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 4px;
}

.music-therapy-freq-hz {
    color: var(--astro-success);
    font-weight: 600;
}

.music-therapy-freq-name {
    color: var(--astro-text);
}

.music-therapy-freq-desc {
    font-size: 11px;
    color: var(--astro-text-light);
    margin-top: 2px;
}

/* Info boxes */
.music-info-box {
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    border-left: 3px solid;
}

.music-info-box.why {
    background: rgba(92, 107, 192, 0.05);
    border-color: var(--astro-primary);
}

.music-info-box.warning {
    background: rgba(243, 156, 18, 0.05);
    border-color: #f39c12;
    padding: 10px;
}

.music-info-box.tips {
    background: rgba(126, 87, 194, 0.05);
    border-color: var(--astro-secondary);
    padding: 10px;
}

.music-info-title {
    margin: 0 0 8px;
    font-size: 0.9em;
}

.music-info-title.why { color: var(--astro-primary); }
.music-info-title.warning { color: #f39c12; font-size: 0.85em; margin-bottom: 4px; }
.music-info-title.tips { color: var(--astro-secondary); font-size: 0.85em; margin-bottom: 4px; }

.music-info-text {
    margin: 0;
    color: var(--astro-text);
    font-size: 12px;
    line-height: 1.5;
}

.music-info-text.small {
    font-size: 11px;
    line-height: 1.4;
}

.music-info-text strong {
    color: var(--astro-primary);
}

/* ═══════════════════════════════════════════════════════════════
   MUSIC ERROR
   ═══════════════════════════════════════════════════════════════ */

.music-error {
    text-align: center;
    padding: 40px;
    color: #e94560;
}

.music-error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.music-error-text {
    font-size: 16px;
    margin-bottom: 20px;
}

.music-error-btn {
    padding: 12px 24px;
    background: #e94560;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.music-error-btn:hover {
    background: #d63850;
}

/* Responsive */
@media (max-width: 480px) {
    .music-player {
        padding: 16px;
        border-radius: 12px;
    }
    
    .music-controls {
        padding: 12px;
    }
    
    .music-buttons {
        gap: 6px;
    }
    
    .music-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .music-badges {
        gap: 4px;
    }
    
    .music-badge {
        padding: 4px 8px;
        font-size: 11px;
    }
}


/* ========================================
   STREAMING - Affichage progressif
   ======================================== */

.streaming-content {
    min-height: 200px;
    padding: 1rem;
    line-height: 1.6;
}

.streaming-content::after {
    content: '▊';
    animation: blink 1s infinite;
    color: var(--astro-primary);
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Quand le streaming est terminé, retirer le curseur */
.streaming-content.done::after {
    display: none;
}

/* Masquer définitivement les anciens boutons */
.astro-type-buttons,
.astro-type-btn {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   BOUTONS DE PARTAGE SOCIAL
   ═══════════════════════════════════════════════════════════════ */

.share-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(126, 87, 194, 0.2);
}

.share-title {
    font-size: 1rem;
    color: var(--astro-text);
    margin-bottom: 15px;
    text-align: center;
    font-weight: 500;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.share-btn svg {
    flex-shrink: 0;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.share-btn:active {
    transform: translateY(0);
}

/* WhatsApp */
.share-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.share-whatsapp:hover {
    background: linear-gradient(135deg, #2EE370 0%, #159A8A 100%);
}

/* Facebook */
.share-facebook {
    background: linear-gradient(135deg, #1877F2 0%, #0D5BBF 100%);
}

.share-facebook:hover {
    background: linear-gradient(135deg, #2B88F7 0%, #1068D1 100%);
}

/* Image */
.share-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.share-image:hover {
    background: linear-gradient(135deg, #7B8FF0 0%, #8A5CB5 100%);
}

.share-image.generating {
    opacity: 0.7;
    cursor: wait;
}

/* ═══════════════════════════════════════════════════════════════
   IMAGE DE PARTAGE (Template)
   ═══════════════════════════════════════════════════════════════ */

.share-preview {
    width: 1080px;
    height: 1920px;
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 30%, #0f0f23 70%, #1a1a2e 100%);
    position: relative;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
}

/* Étoiles en arrière-plan */
.share-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, white, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, white, transparent),
        radial-gradient(2px 2px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 160px 120px, white, transparent),
        radial-gradient(2px 2px at 200px 50px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 250px 160px, white, transparent),
        radial-gradient(2px 2px at 300px 90px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 350px 200px, white, transparent),
        radial-gradient(2px 2px at 400px 130px, rgba(255,255,255,0.8), transparent);
    background-size: 400px 250px;
    opacity: 0.6;
    pointer-events: none;
}

.share-preview-inner {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 80px 60px;
    box-sizing: border-box;
}

/* Logo container */
.share-logo-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 60px;
}

.share-logo-img {
    max-width: 500px;
    height: auto;
    max-height: 120px;
    object-fit: contain;
}

/* Symbole du signe */
.share-zodiac-symbol {
    font-size: 180px;
    margin-bottom: 40px;
    text-shadow: 0 0 60px rgba(168, 85, 247, 0.6), 0 0 120px rgba(99, 102, 241, 0.4);
}

/* Nom du signe */
.share-zodiac-name {
    font-size: 56px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 8px;
    margin-bottom: 50px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Séparateur */
.share-separator {
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    margin: 30px 0;
}

/* Citation/Résumé */
.share-quote {
    font-size: 36px;
    font-style: italic;
    text-align: center;
    line-height: 1.5;
    max-width: 900px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 60px;
    padding: 0 20px;
}

/* Infos astro */
.share-astro-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 60px;
}

.share-astro-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 32px;
    color: rgba(255, 255, 255, 0.85);
}

.share-astro-item-icon {
    width: 50px;
    text-align: center;
}

.share-astro-item-label {
    color: rgba(255, 255, 255, 0.6);
    margin-right: 10px;
}

/* Call to action */
.share-cta {
    margin-top: auto;
    text-align: center;
}

.share-cta-text {
    font-size: 28px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 15px;
}

.share-cta-url {
    font-size: 36px;
    font-weight: 600;
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Modal de prévisualisation */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.share-modal.active {
    opacity: 1;
    visibility: visible;
}

.share-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.share-modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.share-modal-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
}

.share-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
}

.share-modal-close:hover {
    color: #333;
}

.share-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.share-modal-preview {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.share-modal-actions {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.share-modal-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.share-modal-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.share-modal-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.share-modal-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.share-modal-btn-secondary:hover {
    background: #e5e7eb;
}

/* Responsive */
@media (max-width: 600px) {
    .share-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .share-btn {
        justify-content: center;
    }
    
    .share-btn span {
        display: inline;
    }
}
