/* ==========================================================================
   📸 LA BOÎTE À FOCALE - MASTER STYLESHEET (DxO Pro Style)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* --------------------------------------------------------------------------
   1. VARIABLES DE THÈME & RESET
   -------------------------------------------------------------------------- */
* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

:root, [data-theme="dark"] {
    --bg-primary: #141414;
    --bg-secondary: #1e1e1e;
    --bg-tertiary: #282828;
    --bg-card: #1e1e1e;
    --bg-card-hover: #252525;
    --bg-input: #282828;
    
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --text-tertiary: #707070;
    --text-muted: #505050;
    
    --accent-primary: #4a9eff;
    --accent-secondary: #3d88e6;
    --accent-tertiary: #3272cc;
    --accent-success: #5cb85c;
    --accent-warning: #f0ad4e;
    --accent-danger: #d9534f;
    --accent-orange: #ff9800;
    --accent-purple: #9c27b0;
    
    --border-primary: #2a2a2a;
    --border-secondary: #333333;
    --border-accent: #4a9eff;
    --divider: rgba(255, 255, 255, 0.08);
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-focus: 0 0 0 3px rgba(74, 158, 255, 0.2);
    
    --slider-track: #333333;
    --slider-thumb: #4a9eff;
    --slider-bg: #333333;
}

[data-theme="light"] {
    --bg-primary: #f4f5f7;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f0f1f3;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f9fa;
    --bg-input: #f0f1f3;
    
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-tertiary: #6b7280;
    --text-muted: #9ca3af;
    
    --accent-primary: #2563eb;
    --accent-secondary: #1d4ed8;
    --accent-tertiary: #1e40af;
    --accent-success: #16a34a;
    --accent-warning: #d97706;
    --accent-danger: #dc2626;
    --accent-orange: #f97316;
    --accent-purple: #9333ea;
    
    --border-primary: #e5e7eb;
    --border-secondary: #d1d5db;
    --border-accent: #2563eb;
    --divider: rgba(0, 0, 0, 0.08);
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-focus: 0 0 0 3px rgba(37, 99, 235, 0.15);
    
    --slider-track: #e5e7eb;
    --slider-thumb: #2563eb;
    --slider-bg: #e0e0e0;
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.2s ease, color 0.2s ease;
    min-height: 100vh;
}

.main-container, .container-custom {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px 40px;
}

/* --------------------------------------------------------------------------
   2. HEADER, LOGO & SWITCH THEME
   -------------------------------------------------------------------------- */
.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    padding: 0.75rem 1rem;
}

.header .container,
.header .container-custom {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.site-logo-svg {
    border-radius: 8px;
    flex-shrink: 0;
}

.site-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.header-tool-title {
    opacity: 0.75;
    font-weight: 400;
    font-size: 0.95em;
    color: var(--text-secondary);
}

.theme-toggle {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.75rem !important;
    margin: 0 !important;
    flex-shrink: 0;
}

.theme-toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.theme-icon {
    font-size: 18px;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.theme-icon.active {
    color: var(--accent-primary);
}

.switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
    margin: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-switch {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-tertiary);
    transition: 0.2s ease;
    border-radius: 22px;
    border: 1px solid var(--border-secondary);
}

.slider-switch:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background: var(--text-secondary);
    transition: 0.2s ease;
    border-radius: 50%;
}

input:checked + .slider-switch {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

input:checked + .slider-switch:before {
    transform: translateX(20px);
    background: #ffffff;
}

/* En-tête de page */
.page-header-section {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--divider);
}

.page-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    flex: 1;
}

.page-title .material-icons {
    font-size: 28px;
    color: var(--accent-primary);
}

.back-button {
    background: var(--bg-secondary);
    border: 1px solid var(--border-secondary);
    border-radius: 8px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
    text-decoration: none !important;
    flex-shrink: 0;
}

.back-button:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateX(-2px);
}

/* --------------------------------------------------------------------------
   3. CARTES, COMPOSANTS & ALERTES
   -------------------------------------------------------------------------- */
.card, .card-material {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    transition: all 0.2s ease;
    overflow: hidden;
}

.card:hover, .card-material:hover {
    border-color: var(--border-secondary);
}

.card-header, .card-header-material {
    background: transparent;
    border-bottom: 1px solid var(--divider);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.card-title, .card-header-material h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary) !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header .material-icons, .card-header-material .material-icons {
    color: var(--accent-primary);
    font-size: 22px;
}

.card-body, .card-body-material {
    padding: 20px;
    color: var(--text-primary) !important;
}

.card-body p, .card-body strong, .card-body li {
    color: var(--text-primary) !important;
    line-height: 1.6;
}

.alert-info {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-accent) !important;
    color: var(--text-primary) !important;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.alert-info *, .alert-info strong, .alert-info li {
    color: var(--text-primary) !important;
}

.alert-info .material-icons {
    color: var(--accent-primary) !important;
    font-size: 20px;
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   4. SLIDERS & BOUTONS
   -------------------------------------------------------------------------- */
.slider-group, .slider-container {
    background: var(--bg-tertiary);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border-secondary);
}

.slider-container:last-child {
    margin-bottom: 0;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.slider-value {
    background: var(--accent-primary);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
}

input[type="range"], .custom-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--slider-track);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb, .custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    border: 2px solid var(--bg-card);
}

input[type="range"]::-moz-range-thumb, .custom-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--accent-primary);
    border-radius: 50%;
    border: 2px solid var(--bg-card);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

input[type="range"]:hover::-webkit-slider-thumb, .custom-slider:hover::-webkit-slider-thumb {
    transform: scale(1.15);
}

/* Couleurs personnalisées des curseurs d'exposition */
.slider-container.aperture input[type="range"]::-webkit-slider-thumb { background: var(--accent-purple) !important; }
.slider-container.aperture input[type="range"]::-moz-range-thumb { background: var(--accent-purple) !important; }
.slider-container.aperture .slider-value { background: var(--accent-purple) !important; }

.slider-container.iso input[type="range"]::-webkit-slider-thumb { background: var(--accent-success) !important; }
.slider-container.iso input[type="range"]::-moz-range-thumb { background: var(--accent-success) !important; }
.slider-container.iso .slider-value { background: var(--accent-success) !important; }

.slider-container.shutter input[type="range"]::-webkit-slider-thumb { background: var(--accent-orange) !important; }
.slider-container.shutter input[type="range"]::-moz-range-thumb { background: var(--accent-orange) !important; }
.slider-container.shutter .slider-value { background: var(--accent-orange) !important; }

.btn, .btn-custom {
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    border: 1px solid transparent;
}

.btn-primary { background: var(--accent-primary); color: #ffffff; }
.btn-primary:hover { background: var(--accent-secondary); color: #ffffff; }

.btn-outline {
    background: transparent;
    border-color: var(--border-secondary);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* --------------------------------------------------------------------------
   5. SÉLECTION CAPTEURS & BADGES RÉSULTATS
   -------------------------------------------------------------------------- */
.sensor-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.sensor-option {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: 8px;
    padding: 12px 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    color: var(--text-primary) !important;
}

.sensor-option:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
}

.sensor-option.active {
    background: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important;
    color: #ffffff !important;
}

.sensor-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 2px;
    color: var(--text-primary) !important;
}

.sensor-coc, .sensor-detail {
    font-size: 0.725rem;
    color: var(--text-secondary) !important;
}

.sensor-option.active .sensor-name,
.sensor-option.active .sensor-coc,
.sensor-option.active .sensor-detail {
    color: #ffffff !important;
}

.results-grid, .info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.result-badge-card, .info-item {
    background: var(--bg-tertiary) !important;
    padding: 1.25rem 1rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid var(--border-secondary) !important;
    transition: all 0.15s ease;
}

.result-badge-card:hover, .info-item:hover {
    border-color: var(--border-accent) !important;
    background: var(--bg-card-hover) !important;
    transform: translateY(-2px);
}

.result-badge-card.primary { border-top: 3px solid var(--accent-primary) !important; }
.result-badge-card.secondary { border-top: 3px solid var(--accent-orange) !important; }
.result-badge-card.tertiary { border-top: 3px solid var(--accent-purple) !important; }

.result-badge-label, .info-label {
    color: var(--text-secondary) !important;
    font-size: 0.75rem;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-wrap: wrap;
}

.info-label .material-icons, .result-badge-label .material-icons {
    font-size: 16px;
    color: var(--accent-primary) !important;
}

.result-badge-value, .info-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary) !important;
    font-variant-numeric: tabular-nums;
}

.info-value { color: var(--accent-primary) !important; }
.result-badge-card.primary .result-badge-value { color: var(--accent-primary) !important; }
.result-badge-card.secondary .result-badge-value { color: var(--accent-orange) !important; }
.result-badge-card.tertiary .result-badge-value { color: var(--accent-purple) !important; }

/* --------------------------------------------------------------------------
   6. VISUALISATION DYNAMIQUE (PDC & HYPERFOCALE)
   -------------------------------------------------------------------------- */
.visualization-card {
    padding: 0;
    overflow: hidden;
}

.visualization-area {
    position: relative;
    height: 320px;
    background: var(--bg-tertiary);
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

.visualization-area::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 60px;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 49px,
        var(--divider) 49px,
        var(--divider) 50px
    );
    pointer-events: none;
}

.distance-scale {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: var(--bg-card);
    border-top: 2px solid var(--accent-primary);
    z-index: 10;
}

.scale-markers {
    position: relative;
    width: 100%;
    height: 100%;
}

.scale-marker {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 6px;
}

.scale-tick {
    width: 2px;
    height: 12px;
    background: var(--accent-primary);
}

.scale-label {
    margin-top: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary) !important;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.focus-zone {
    position: absolute;
    top: 0; bottom: 60px; left: 0; right: 0;
}

.dof-visualization {
    position: absolute;
    top: 0; bottom: 60px;
    transition: all 0.25s ease;
}

.sharp-zone {
    background: rgba(92, 184, 92, 0.25);
    border-left: 2px solid var(--accent-success);
    border-right: 2px solid var(--accent-success);
    box-shadow: inset 0 0 20px rgba(92, 184, 92, 0.15);
    z-index: 2;
}

.blur-zone-near {
    background: linear-gradient(to right, rgba(120, 120, 120, 0.15), transparent);
    z-index: 1;
}

.blur-zone-far {
    background: linear-gradient(to right, transparent, rgba(120, 120, 120, 0.15));
    z-index: 1;
}

.focus-point {
    position: absolute;
    top: 0; bottom: 60px;
    width: 2px;
    background: var(--accent-orange);
    z-index: 10;
    transition: all 0.25s ease;
}

.focus-point::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 26px;
    height: 26px;
    background: var(--accent-orange);
    border-radius: 50%;
    border: 3px solid var(--bg-card);
    box-shadow: var(--shadow-md);
    animation: pulse-focus 2s ease-in-out infinite;
}

@keyframes pulse-focus {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.15); }
}

.camera-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-80%);
    color: var(--text-secondary) !important;
    z-index: 5;
    pointer-events: none;
}

.camera-icon .material-icons {
    font-size: 40px;
    color: var(--text-secondary) !important;
}

/* Diagramme Hyperfocale */
.hyperfocal-diagram {
    margin: 1.5rem 0;
    padding: 40px 20px 20px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    border: 1px solid var(--border-secondary);
    position: relative;
    min-height: 180px;
}

.diagram-line {
    position: relative;
    height: 4px;
    background: var(--slider-track);
    margin: 60px 0 20px;
    border-radius: 2px;
}

.marker-item {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 10;
}

.marker-item.camera { left: 0; }
.marker-item.infinity { right: 0; }

.marker-item .material-icons {
    font-size: 32px;
    color: var(--text-secondary);
}

.marker-item.hyperfocal .material-icons { color: var(--accent-success); }

.marker-item .label {
    font-size: 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
    background: var(--bg-card);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-secondary);
    white-space: nowrap;
}

.marker-item.hyperfocal .label {
    background: var(--accent-success);
    color: #ffffff;
    border-color: var(--accent-success);
}

.sharp-zone-indicator {
    position: absolute;
    top: 50%;
    height: 16px;
    background: rgba(92, 184, 92, 0.25);
    border-top: 2px solid var(--accent-success);
    border-bottom: 2px solid var(--accent-success);
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 5;
    transition: all 0.25s ease;
}

.sharp-label {
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.725rem;
    color: var(--accent-success);
    font-weight: 700;
    background: var(--bg-card);
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid var(--accent-success);
    white-space: nowrap;
    z-index: 20;
}

/* --------------------------------------------------------------------------
   7. CALCULATEUR D'EXPOSITION (RÉFÉRENCE & ND)
   -------------------------------------------------------------------------- */
.reference-display {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    color: #ffffff;
}

.reference-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.reference-title {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-change-reference {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    font-size: 0.825rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-change-reference:hover { background: rgba(255, 255, 255, 0.35); }

.reference-values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    background: rgba(0, 0, 0, 0.15);
    padding: 0.85rem;
    border-radius: 8px;
}

.reference-item { text-align: center; }
.reference-item-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.2rem;
}

.reference-item-value {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.btn-reset {
    background: transparent;
    color: var(--accent-danger);
    border: 1px solid var(--accent-danger);
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    font-size: 0.825rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-reset:hover { background: var(--accent-danger); color: #ffffff; }

.result-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: 10px;
    padding: 1.25rem 1rem;
    text-align: center;
    transition: all 0.2s ease;
}

.result-card.aperture { border-top: 3px solid var(--accent-purple); }
.result-card.iso { border-top: 3px solid var(--accent-success); }
.result-card.shutter { border-top: 3px solid var(--accent-orange); }

.result-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.result-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
}

.result-card.aperture .result-icon { background: rgba(156, 39, 176, 0.15); color: var(--accent-purple); }
.result-card.iso .result-icon { background: rgba(92, 184, 92, 0.15); color: var(--accent-success); }
.result-card.shutter .result-icon { background: rgba(255, 152, 0, 0.15); color: var(--accent-orange); }

.result-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    font-weight: 600;
    text-transform: uppercase;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    margin-bottom: 0.5rem;
}

.result-change {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-weight: 600;
    display: inline-block;
    background: var(--bg-primary);
    color: var(--text-tertiary);
}

.result-change.positive { background: rgba(92, 184, 92, 0.15); color: var(--accent-success); }
.result-change.negative { background: rgba(217, 83, 79, 0.15); color: var(--accent-danger); }

.nd-filter-section {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: 10px;
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.nd-section-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
}

.nd-section-title .material-icons { color: var(--accent-orange); }
.nd-section-subtitle { font-size: 0.825rem; color: var(--text-secondary); margin-bottom: 1rem; }

.nd-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.nd-filter-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-secondary);
    border-radius: 6px;
    padding: 0.6rem 0.4rem;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    color: var(--text-primary);
}

.nd-filter-btn:hover { background: var(--bg-card-hover); border-color: var(--accent-orange); }
.nd-filter-btn.active { background: var(--accent-orange); border-color: var(--accent-orange); color: #ffffff; }

.nd-filter-stops { font-size: 0.95rem; font-weight: 700; }
.nd-filter-value { font-size: 0.75rem; opacity: 0.85; }

.nd-result-display {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--accent-orange);
    text-align: center;
}

.nd-result-label { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.25rem; font-weight: 500; text-transform: uppercase; }
.nd-result-value { font-size: 1.75rem; font-weight: 700; color: var(--accent-orange); font-variant-numeric: tabular-nums; }

/* Modale */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-overlay.active { display: flex; }

.modal-content {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 520px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-primary);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--divider);
}

.modal-title { font-size: 1.1rem; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 0.5rem; color: var(--text-primary); }
.modal-close { background: transparent; border: none; color: var(--text-secondary); cursor: pointer; padding: 0.25rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.modal-close:hover { color: var(--text-primary); }
.modal-footer { display: flex; justify-content: flex-end; gap: 0.75rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--divider); }

/* --------------------------------------------------------------------------
   8. HEURES DU CIEL & CHRONOLOGIE (SUN / MOON)
   -------------------------------------------------------------------------- */
.search-wrapper { position: relative; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-tertiary); pointer-events: none; z-index: 1; font-size: 20px; }
#location-search, #location-input { padding-left: 40px; background: var(--bg-tertiary); border: 1px solid var(--border-secondary); color: var(--text-primary); border-radius: 8px; }

.controls-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; }
.control-group label { display: block; margin-bottom: 0.5rem; font-size: 0.825rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); }

.autocomplete-items, .location-suggestions {
    position: absolute;
    top: 100%; left: 0; right: 0;
    z-index: 999;
    background: var(--bg-card);
    border: 1px solid var(--border-secondary);
    border-radius: 8px;
    margin-top: 4px;
    max-height: 280px;
    overflow-y: auto;
    box-shadow: var(--shadow-md);
}

.autocomplete-item, .suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--divider);
    transition: background 0.15s ease;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.autocomplete-item:hover, .suggestion-item:hover { background: var(--bg-card-hover); color: var(--accent-primary); }

.loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem; color: var(--text-secondary); }
.loading .material-icons { font-size: 2.5rem; margin-bottom: 0.75rem; color: var(--accent-primary); animation: spin 2s linear infinite; }

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.location-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.location-name { font-size: 1.25rem; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 0.5rem; }
.location-coords { font-size: 0.85rem; color: var(--text-secondary); display: flex; align-items: center; gap: 0.4rem; margin-top: 0.25rem; font-variant-numeric: tabular-nums; }
.location-date { font-size: 0.95rem; color: var(--accent-primary); font-weight: 600; display: flex; align-items: center; gap: 0.4rem; background: var(--bg-tertiary); padding: 0.4rem 0.85rem; border-radius: 6px; border: 1px solid var(--border-secondary); }

.timeline-section { margin-bottom: 2rem; }
.timeline-section-title { font-size: 1.05rem; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.25rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--divider); }
.timeline-item { display: flex; gap: 1rem; margin-bottom: 1.25rem; position: relative; }
.timeline-item:not(:last-child)::after { content: ''; position: absolute; left: 20px; top: 42px; bottom: -20px; width: 2px; background: var(--divider); }

.timeline-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: var(--shadow-sm); position: relative; z-index: 1; }
.timeline-icon .material-icons { font-size: 20px; color: #ffffff; }

.astro-icon { background: linear-gradient(135deg, #1a237e, #283593); }
.nautical-icon { background: linear-gradient(135deg, #0d47a1, #1565c0); }
.blue-hour-icon { background: linear-gradient(135deg, #1976d2, #2196f3); }
.golden-hour-icon { background: linear-gradient(135deg, #ff9800, #ffc107); }
.sunrise-icon { background: linear-gradient(135deg, #ff6f00, #ff9800); }
.sunset-icon { background: linear-gradient(135deg, #e65100, #f57c00); }
.moon-icon { background: linear-gradient(135deg, #0288d1, #29b6f6); }

.timeline-content { flex: 1; background: var(--bg-tertiary); padding: 0.85rem 1rem; border-radius: 8px; border: 1px solid var(--border-secondary); transition: all 0.2s ease; }
.timeline-content:hover { background: var(--bg-card-hover); border-color: var(--border-accent); }
.timeline-title { font-weight: 600; margin-bottom: 0.25rem; color: var(--text-primary); font-size: 0.95rem; }
.timeline-time { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.25rem; font-variant-numeric: tabular-nums; color: var(--accent-primary); }
.timeline-range { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.timeline-range span { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.time-separator { color: var(--accent-primary); font-weight: bold; }
.timeline-duration { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.2rem; font-weight: 500; }
.timeline-description { font-size: 0.825rem; color: var(--text-secondary); margin-top: 0.35rem; line-height: 1.4; }

.moon-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.85rem; margin-top: 1.25rem; }
.moon-info-item { background: var(--bg-tertiary); border: 1px solid var(--border-secondary); border-radius: 8px; padding: 1.25rem 0.85rem; text-align: center; transition: all 0.2s ease; }
.moon-info-item:hover { background: var(--bg-card-hover); border-color: var(--border-accent); }
.moon-phase-visual { font-size: 2.5rem; margin-bottom: 0.35rem; line-height: 1; }
.moon-info-label { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 0.25rem; text-transform: uppercase; font-weight: 600; }
.moon-info-value { font-size: 1.1rem; font-weight: 700; color: var(--accent-primary); font-variant-numeric: tabular-nums; }

/* Flatpickr Theme Adjustments */
.flatpickr-calendar { background: var(--bg-card) !important; border: 1px solid var(--border-secondary) !important; box-shadow: var(--shadow-lg) !important; border-radius: 8px !important; }
.flatpickr-day { color: var(--text-primary) !important; border-radius: 6px !important; }
.flatpickr-day:hover { background: var(--bg-tertiary) !important; }
.flatpickr-day.selected { background: var(--accent-primary) !important; border-color: var(--accent-primary) !important; color: #ffffff !important; }
.flatpickr-months .flatpickr-month, .flatpickr-current-month .flatpickr-monthDropdown-months, span.flatpickr-weekday { color: var(--text-primary) !important; fill: var(--text-primary) !important; }

/* --------------------------------------------------------------------------
   9. CALENDRIER VOIE LACTÉE
   -------------------------------------------------------------------------- */
.calendar-header-actions { display: flex; align-items: center; gap: 8px; }
.nav-btn { background: var(--bg-tertiary); border: 1px solid var(--border-secondary); border-radius: 6px; color: var(--text-primary); width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.15s ease; }
.nav-btn:hover { background: var(--bg-card-hover); border-color: var(--accent-primary); color: var(--accent-primary); }

.location-controls { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.current-location-badge { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--accent-primary); font-weight: 500; }

.moon-phase-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(115px, 1fr)); gap: 10px; margin-bottom: 20px; }
.moon-day { background: var(--bg-tertiary); border: 1px solid var(--border-secondary); border-radius: 8px; padding: 10px 8px; text-align: center; transition: all 0.15s ease; display: flex; flex-direction: column; align-items: center; justify-content: space-between; }
.moon-day:hover { background: var(--bg-card-hover); border-color: var(--border-accent); transform: translateY(-2px); }
.moon-date { font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); text-transform: capitalize; }
.moon-icon { font-size: 26px; margin: 4px 0; line-height: 1; }
.moon-phase-name { font-size: 0.75rem; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.moon-illumination { font-size: 0.7rem; color: var(--text-secondary); line-height: 1.3; font-variant-numeric: tabular-nums; }

.moon-day.photo-ok-night { background: rgba(92, 184, 92, 0.15); border-color: var(--accent-success); }
.moon-day.photo-ok-evening { background: rgba(74, 158, 255, 0.15); border-color: var(--accent-primary); }
.moon-day.photo-ok-morning { background: rgba(156, 39, 176, 0.15); border-color: var(--accent-purple); }

.moon-legend { display: flex; justify-content: center; gap: 20px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--divider); flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 0.825rem; font-weight: 500; color: var(--text-secondary); }
.legend-icon { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.legend-icon.night { background: var(--accent-success); }
.legend-icon.evening { background: var(--accent-primary); }
.legend-icon.morning { background: var(--accent-purple); }

/* --------------------------------------------------------------------------
   10. PAGE D'ACCUEIL (INDEX) & À PROPOS
   -------------------------------------------------------------------------- */
.hero-banner {
    background: var(--bg-card);
    border: 1px solid var(--border-secondary);
    border-radius: 16px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.hero-title {
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero-subtitle { color: var(--text-secondary); font-size: 1.05rem; margin-bottom: 0; }

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none !important;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tool-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.tool-header { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 0.75rem; }
.tool-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent-primary);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.tool-card:hover .tool-icon { background: var(--accent-primary); color: #ffffff; border-color: var(--accent-primary); }
.tool-title { color: var(--text-primary) !important; font-size: 1.15rem; font-weight: 600; margin: 0; }
.tool-description { color: var(--text-secondary) !important; font-size: 0.875rem; line-height: 1.5; margin-bottom: 1rem; }
.tool-action { color: var(--accent-primary); font-size: 0.85rem; font-weight: 600; display: flex; align-items: center; gap: 0.25rem; }
.tool-action .material-icons { font-size: 18px; transition: transform 0.2s ease; }
.tool-card:hover .tool-action .material-icons { transform: translateX(4px); }

/* À Propos */
.version-badge {
    display: inline-block;
    background: var(--accent-primary);
    color: #ffffff !important;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    margin-top: 1rem;
}

.tech-item {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-secondary);
    transition: all 0.15s ease;
}

.tech-item:hover { border-color: var(--border-accent); background: var(--bg-card-hover); transform: translateY(-2px); }
.tech-item h3 { color: var(--text-primary) !important; font-size: 0.95rem; font-weight: 600; margin-bottom: 0.4rem; display: flex; align-items: center; gap: 0.5rem; }
.tech-item h3 .material-icons { font-size: 1.1rem; color: var(--accent-primary); }
.tech-item p { color: var(--text-secondary) !important; font-size: 0.825rem; margin-bottom: 0.5rem; line-height: 1.4; }
.tech-item a { color: var(--accent-primary); text-decoration: none; font-size: 0.8rem; font-weight: 500; display: inline-flex; align-items: center; gap: 0.25rem; }
.tech-item a:hover { text-decoration: underline; }
.tech-item a .material-icons { font-size: 0.9rem; }

.legal-section {
    background: var(--bg-tertiary);
    padding: 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--border-secondary);
    border-left: 3px solid var(--accent-primary);
}

.contact-box {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    margin-top: 1.5rem;
}

.contact-box h3 { color: #ffffff !important; font-size: 1.2rem; font-weight: 600; margin-bottom: 0.5rem; }
.contact-box p, .contact-box a { color: #ffffff !important; font-weight: 600; }

/* --------------------------------------------------------------------------
   11. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .controls-grid { grid-template-columns: 1fr; }
    .location-header { flex-direction: column; align-items: flex-start; }
    .page-title { font-size: 1.25rem; }
}

@media (max-width: 576px) {
    .sensor-selection, .moon-phase-grid { grid-template-columns: repeat(2, 1fr); }
    .result-badge-value, .info-value { font-size: 1.3rem; }
    .visualization-area { height: 260px; }
    .focus-zone, .dof-visualization, .focus-point { height: 200px; bottom: 60px; }
    .theme-text { display: none; }
    .moon-legend { flex-direction: column; align-items: flex-start; gap: 10px; }
}
        /* Anti-scroll horizontal global */
        html, body {
            overflow-x: hidden;
            width: 100%;
        }

        /* Conteneur fluide pour le titre sans pousser le switch */
        .navbar-brand-container {
            min-width: 0;
            flex: 1 1 auto;
            padding-right: 6px;
        }

        .header-title-text {
            display: block;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
.header-logo {
    width: 38px;
    height: 38px;
    border-radius: 9px !important;
}

.header-logo svg {
    width: 24px;
    height: 24px;
}
.header-title-text {
    display: flex;
    align-items: baseline;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-site-name {
    color: var(--text-primary, #fff);
    font-size: 20px;
    font-weight: 700;
}

.header-page-title {
    color: var(--text-secondary, #999);
    font-size: 20px;
    font-weight: 400;
    margin-left: 6px;
}
.navbar-custom {
    height: 62px;
    min-height: 62px;
    background: #181818;
    border-bottom: 1px solid #2a2a2a;
    display: flex;
    align-items: center;
}

.navbar-custom .container-custom {
    width: 100%;
    max-width: 1288px;
    height: 100%;
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
}

.navbar-brand-container {
    min-width: 0;
    flex: 1 1 auto;
    padding-right: 20px;
    height: 100%;
}

.theme-toggle {
    flex-shrink: 0;
}
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.theme-toggle-label {
    gap: 3px !important;
}

.theme-icon {
    font-size: 18px !important;
    opacity: 0.65;
}

.theme-icon.active {
    opacity: 1;
}



/* =========================================================
   CORRECTION FORCÉE DU HEADER
   À PLACER TOUT EN BAS DE style.css
   ========================================================= */

.navbar-custom {
    height: 62px !important;
    min-height: 62px !important;
    max-height: 62px !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.navbar-custom .container-custom {
    height: 62px !important;
    min-height: 62px !important;
    max-height: 62px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
}

.navbar-custom .navbar-brand-container {
    height: 62px !important;
    min-height: 62px !important;
    max-height: 62px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
}

.navbar-custom .header-logo {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}

.navbar-custom .header-logo svg {
    width: 22px !important;
    height: 22px !important;
}

.navbar-custom .header-title-text {
    font-size: inherit !important;
    line-height: 1.2 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.navbar-custom .header-site-name {
    font-size: 19px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
}

.navbar-custom .header-page-title {
    font-size: 19px !important;
    line-height: 1.2 !important;
    font-weight: 400 !important;
    margin-left: 6px !important;
    color: #858585 !important;
}

.navbar-custom .theme-toggle {
    height: 62px !important;
    min-height: 62px !important;
    max-height: 62px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
}

/* Fond global transparent pour laisser apparaître Vegas */
html, body {
    background-color: transparent !important;
}

/* --- MODE SOMBRE (Par défaut ou data-theme="dark") --- */
[data-bs-theme="dark"] .card {
    background-color: rgba(22, 27, 34, 0.75) !important;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

[data-bs-theme="dark"] .card-title,
[data-bs-theme="dark"] h1, 
[data-bs-theme="dark"] h2, 
[data-bs-theme="dark"] h3 {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .text-muted {
    color: #cbd5e1 !important; /* Gris clair lisible */
}

/* --- MODE CLAIR (data-theme="light") --- */
[data-bs-theme="light"] .card {
    background-color: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

[data-bs-theme="light"] .card-title,
[data-bs-theme="light"] h1, 
[data-bs-theme="light"] h2, 
[data-bs-theme="light"] h3 {
    color: #0f172a !important; /* Texte sombre et lisible */
}

[data-bs-theme="light"] .text-muted {
    color: #334155 !important;
}

/* Ajustement du header pour les deux modes */
.header {
    background-color: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   PATCH DE TRANSPARENCE & FIX VEGAS (À placer à la fin de ton style.css)
   ========================================================================== */

/* Rend le fond transparent pour laisser voir Vegas */
html, body {
    background-color: #0f172a !important;
}

body.vegas-container {
    background-color: transparent !important;
}

/* Transparence des cartes & Header en verre dépoli */
.header {
    background-color: rgba(15, 23, 42, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.card {
    background-color: rgba(15, 23, 42, 0.80) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* Force le contraste des textes sur les images */
.card-title, h1, h2, h3, h4, h5, h6 {
    color: #ffffff !important;
}

.text-muted {
    color: #cbd5e1 !important;
}




/* Boîte dédiée pour le titre de page */
.page-header-section {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0.85rem 1.25rem;
    background: rgba(15, 23, 42, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.15) !important;
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #4a9eff !important;
    text-decoration: none;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.back-button:hover {
    background: #3b82f6 !important;
    color: #ffffff !important;
}

.page-title {
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 600;
    color: #ffffff !important;
    line-height: 1;
}

.page-title .material-icons {
    color: #4a9eff;
    font-size: 1.6rem;
    display: inline-flex;
    align-items: center;
}

/* Fix Responsive Header Mobile */ 
.header .container-custom {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 10px;
}

.header-left {
    display: flex !important;
    align-items: center !important;
    overflow: hidden;
    white-space: nowrap;
}

.site-title {
    white-space: nowrap;
}

/* Masque le sous-titre de la page sur mobile pour éviter l'écrasement */
@media (max-width: 768px) {
    .header-tool-title {
        display: none !important;
    }
}