/**
 * style.css - VirtualLine Tracker
 * Version: 3.2 (UNIFIED & REFINED HOVER)
 * Description: Fichier de style unique, complet et refactorisé pour l'ensemble du site.
 *              Effet de survol affiné pour se concentrer sur le zoom de l'image.
 */

/* ============================================= */
/* === 1. Variables CSS & Styles Globaux === */
/* ============================================= */
:root {
    /* Palette de couleurs */
    --color-primary: #003865;       /* Bleu marine EP, titres principaux */
    --color-secondary: #0056b3;     /* Bleu plus clair, liens, accents */
    --color-accent: #e4002b;        /* Rouge EP, boutons importants, erreurs */
    --color-warning: #fb8c00;       /* Orange, estimations, affluence moyenne */
    --color-success: #43a047;       /* Vert, disponible, affluence faible */
    
    /* Palette neutre */
    --color-background: #f8f9fa;    /* Fond général des pages */
    --color-card-bg: #ffffff;       /* Fond des cartes et conteneurs */
    --color-text-primary: #37474f;  /* Texte principal */
    --color-text-secondary: #546e7a;/* Texte secondaire, labels */
    --color-border: #e0e0e0;        /* Bordures légères */
    --color-white: #fff;            /* Blanc pur */
    --color-dark-bg: #343a40;       /* Fond du footer */

    /* Ombres */
    --shadow: 0 5px 15px rgba(0, 56, 101, 0.08);
    --shadow-lg: 0 10px 25px rgba(0, 56, 101, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { 
    font-family: 'Montserrat', sans-serif; 
    line-height: 1.65; 
    color: var(--color-text-primary); 
    background-color: var(--color-background); 
    -webkit-font-smoothing: antialiased; 
    -moz-osx-font-smoothing: grayscale; 
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 25px; }
a { color: var(--color-secondary); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--color-primary); }
h1, h2, h3, h4 { color: var(--color-primary); line-height: 1.3; }

/* ============================================= */
/* === 2. Header & Footer (Communs) === */
/* ============================================= */
header { 
    background-color: var(--color-primary); 
    color: var(--color-white); 
    padding: 1rem 0; 
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1); 
    position: sticky; top: 0; z-index: 1000; 
}
header .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
header .logo h1 { color: var(--color-white); font-size: 1.7rem; font-weight: 700; margin-bottom: 0; }
header .logo p { color: #b0bec5; font-size: 0.85rem; margin-top: -2px; }
header nav ul { list-style: none; display: flex; margin-top: 5px; padding-left: 0; }
header nav ul li { margin-left: 25px; }
header nav ul li a { color: #eceff1; padding: 6px 12px; border-radius: 6px; font-weight: 500; transition: background-color 0.2s ease, color 0.2s ease; }
header nav ul li a.active, header nav ul li a:hover { background-color: rgba(255, 255, 255, 0.15); color: var(--color-white); }

footer { 
    background-color: var(--color-dark-bg); 
    color: #adb5bd; 
    padding: 40px 0 20px 0; margin-top: 50px; 
}
.footer-bottom { text-align: center; font-size: 0.85rem; }
.footer-bottom p { margin-bottom: 8px; }
.footer-bottom a { color: #dee2e6; border-bottom: 1px dotted #888; }
.footer-bottom a:hover { color: var(--color-white); border-bottom-color: var(--color-white); }
#last-check-time { font-weight: 500; color: var(--color-white); }

/* ============================================= */
/* === 3. Page d'Accueil (index.html) === */
/* ============================================= */
.hero { background: linear-gradient(rgba(0, 40, 75, 0.85), rgba(0, 56, 101, 0.88)), url('/images/ep-panorama.jpg') no-repeat center center/cover; color: var(--color-white); text-align: center; padding: 80px 0 70px 0; }
.hero h2 { color: var(--color-white); font-size: 2.8rem; }
.hero p { color: #e0e0e0; font-size: 1.15rem; max-width: 750px; margin: 0 auto 40px auto; }
.btn.primary { background-color: var(--color-accent); color: var(--color-white); font-weight: 600; border: none; padding: 12px 28px; border-radius: 8px; cursor: pointer; transition: background-color 0.3s ease, transform 0.1s ease; }
.btn.primary:hover { background-color: #c30024; transform: translateY(-2px); }

.attractions { background-color: var(--color-card-bg); padding: 50px 0; }
.attractions .container > h2 { font-size: 2.3rem; text-align: center; margin-bottom: 15px; }
.attractions .container > p { color: var(--color-text-secondary); text-align: center; margin-bottom: 40px; }
.attraction-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 30px; }

/* --- AMÉLIORATIONS DES CARTES ATTRACTION (Version raffinée) --- */

.attraction-card {
    background-color: var(--color-card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
    transition: box-shadow 0.3s ease-out, border-color 0.3s ease-out;
}

.attraction-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--color-secondary);
}

.attraction-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    cursor: pointer;
}

.attraction-image {
    height: 200px;
    overflow: hidden;
}

.attraction-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease-out;
}

.attraction-card:hover .attraction-image img {
    transform: scale(1.10);
}

/* --- Fin des améliorations --- */

.attraction-info { padding: 25px 25px 15px 25px; text-align: center; flex-grow: 1; }
.attraction-info h3 { font-size: 1.4rem; margin-bottom: 10px; }
.attraction-info-footer { padding: 0 25px 25px 25px; margin-top: auto; }
.attraction-card .wait-time-badge { display: inline-flex; align-items: center; justify-content: center; background-color: var(--color-text-secondary); color: var(--color-white); padding: 4px 10px; border-radius: 16px; font-size: 0.9em; font-weight: 600; margin: 0 auto 15px auto; }
.attraction-card .wait-time-badge.wait-low { background-color: var(--color-success); }
.attraction-card .wait-time-badge.wait-medium { background-color: var(--color-warning); }
.attraction-card .wait-time-badge.wait-high { background-color: var(--color-accent); }
.vl-status-button { display: inline-flex; align-items: center; justify-content: center; width: 100%; padding: 10px 18px; border-radius: 30px; font-weight: 600; font-size: 1em; color: var(--color-white); border: 2px solid transparent; cursor: pointer; transition: all 0.3s ease; }
.vl-status-button:hover { transform: translateY(-2px); }
.vl-status-button .vl-bell-icon { margin-right: 10px; font-size: 1.1em; }
.vl-status-button.loading { background-color: #b0bec5; color: var(--color-text-primary); cursor: wait; }
.vl-status-button.available { background-color: var(--color-success); }
.vl-status-button.estimated { background-color: var(--color-warning); }
.vl-status-button.closed, .vl-status-button.unavailable-today { background-color: var(--color-text-secondary); }
.vl-status-button.subscribed { border-color: #FFC107; }

/* ============================================= */
/* === 4. Page Temps d'Attente (wait-times.html) === */
/* ============================================= */
.wait-times-section { padding: 40px 0; }
.sort-controls { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 30px; padding: 10px; background-color: #e9ecef; border-radius: 8px; }
.sort-button { padding: 8px 15px; font-size: 0.9em; color: var(--color-text-primary); background-color: var(--color-card-bg); border: 1px solid #ced4da; border-radius: 20px; cursor: pointer; transition: all 0.2s ease; }
.sort-button.active { background-color: var(--color-secondary); color: var(--color-white); border-color: var(--color-secondary); }
.rides-list-container { list-style: none; padding: 0; margin: 0; }
.ride-list-item { display: flex; align-items: center; background-color: var(--color-card-bg); border-radius: 10px; box-shadow: var(--shadow); padding: 15px 20px; margin-bottom: 20px; transition: transform 0.2s ease-out, box-shadow 0.2s ease-out; }
.ride-image { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; margin-right: 20px; }
.ride-details h3 { font-size: 1.25rem; }
.status-label { font-size: 0.85em; font-weight: 700; padding: 3px 10px; border-radius: 12px; color: var(--color-white); }
.status-label.status-open { background-color: var(--color-success); }
.status-label.status-closed { background-color: var(--color-text-secondary); }
.wait-time { font-weight: 600; margin-left: 15px; font-size: 1.1rem; }
.wait-time.wait-low { color: var(--color-success); }
.wait-time.wait-medium { color: var(--color-warning); }
.wait-time.wait-high { color: var(--color-accent); }

/* ============================================= */
/* === 5. Page Détails Attraction (attraction-details.html) === */
/* ============================================= */
.attraction-details-section { padding: 40px 0; }
#details-content { display: flex; flex-direction: column; gap: 2rem; }

.details-header { display: flex; gap: 2.5rem; background: var(--color-card-bg); padding: 2.5rem; border-radius: 16px; box-shadow: var(--shadow); align-items: center; }
.attraction-main-image { width: 350px; height: 230px; object-fit: cover; border-radius: 12px; flex-shrink: 0; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.header-content { flex: 1; }
.attraction-title { font-size: 2.8rem; font-weight: 700; margin-bottom: 1rem; }
.attraction-description { font-size: 1.1rem; line-height: 1.7; color: var(--color-text-secondary); max-width: 70ch; }

.details-info-badges { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.info-badge { background: var(--color-card-bg); border-radius: 12px; padding: 1.5rem; box-shadow: var(--shadow); text-align: center; border-left: 5px solid var(--color-secondary); transition: transform 0.2s ease-in-out; }
.info-badge:hover { transform: translateY(-4px); }
.info-badge.status-open { border-left-color: var(--color-success); }
.info-badge.status-closed { border-left-color: var(--color-accent); }
.info-badge.virtual-line { border-left-color: var(--color-warning); }
.info-badge .label { display: block; font-size: 0.9rem; font-weight: 600; color: var(--color-text-secondary); margin-bottom: 0.75rem; }
.info-badge .value { display: block; font-size: 1.5rem; font-weight: 700; color: var(--color-text-primary); line-height: 1.2; }

.practical-info-container, .technical-specs-container { background: var(--color-card-bg); border-radius: 16px; padding: 2.5rem; box-shadow: var(--shadow); }
.practical-title, .specs-title { font-size: 1.8rem; font-weight: 600; margin-bottom: 2rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--color-border); }
.practical-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.info-card { background: var(--color-background); border: 1px solid var(--color-border); border-radius: 8px; padding: 1.5rem; }
.info-card h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.info-card p { font-size: 1rem; color: var(--color-text-secondary); margin: 0; }
.technical-specs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.spec-item { display: flex; justify-content: space-between; align-items: center; padding: 1rem; background: var(--color-background); border-radius: 6px; }
.spec-label { font-weight: 500; color: var(--color-text-secondary); }
.spec-value { font-weight: 600; color: var(--color-text-primary); }

.additional-info { text-align: center; margin-top: 1rem; }
.last-updated { color: var(--color-text-secondary); font-style: italic; font-size: 0.9rem; }

/* ============================================= */
/* === 6. Composants Communs (Messages, Notifs) === */
/* ============================================= */
.loading-message { text-align: center; padding: 30px; font-size: 1.1em; color: var(--color-text-secondary); }
.loading-message i { margin-right: 8px; color: var(--color-secondary); }
.error-box { text-align: center; padding: 20px; margin-top: 20px; border: 1px solid #f5c6cb; background-color: #f8d7da; color: #721c24; border-radius: 8px; }
.notification { position: fixed; bottom: 25px; right: 25px; padding: 16px 22px; border-radius: 8px; color: var(--color-white); z-index: 1050; opacity: 0; transform: translateX(110%); transition: opacity 0.4s ease, transform 0.4s ease; box-shadow: var(--shadow-lg); }
.notification.success { background-color: var(--color-success); }
.notification.error { background-color: var(--color-accent); }
.notification.warning { background-color: var(--color-warning); }
.notification.info { background-color: var(--color-secondary); }

.ride-list-item-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    width: 100%;
}

.ride-list-item.non-clickable {
    cursor: not-allowed;
    filter: grayscale(50%);
    opacity: 0.8;
}

.ride-list-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 56, 101, 0.1);
}
/* Styles pour le conteneur du graphique */
.chart-container {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.chart-title {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.4em;
    color: #333;
}
/* ============================================= */
/* === 7. Responsive & Animations === */
/* ============================================= */
@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
.details-header, .details-info-badges, .practical-info-container, .technical-specs-container { animation: fadeIn 0.5s ease-out forwards; }

@media (max-width: 992px) {
    .details-header { flex-direction: column; text-align: center; padding: 1.5rem; }
    .attraction-main-image { width: 100%; height: auto; max-height: 300px; }
    .attraction-title { font-size: 2.2rem; }
}

@media (max-width: 768px) {
    html { font-size: 15px; }
    header .container { flex-direction: column; text-align: center; }
    header nav ul { margin-top: 15px; justify-content: center; }
    
    .hero { padding: 60px 0; }
    .hero h2 { font-size: 2.2rem; }
    
    .attraction-grid { grid-template-columns: 1fr; }
    .ride-list-item { flex-direction: column; align-items: flex-start; }
    .ride-image { width: 100%; height: 150px; margin-right: 0; margin-bottom: 15px; }
    .ride-details { margin-top: 0; }

    .details-header h2 { font-size: 2rem; }
    .practical-info-container, .technical-specs-container { padding: 1.5rem; }
    .practical-title, .specs-title { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .hero h2 { font-size: 1.9rem; }
    .attraction-info h3, .ride-details h3 { font-size: 1.2rem; }
    .details-header h2, .attraction-title { font-size: 1.8rem; }
    .notification { left: 15px; right: 15px; bottom: 15px; width: auto; }
}