/* ========================================= */
/* 🎨 Fichier : index.css - Styles Généraux & Classes 🎨 */
/* ========================================= */

/* --- 1. Variables et Global Reset --- */
:root {
    --color-primary: #003366; /* Bleu Marine / Nuit */
    --color-secondary: #FFD700; /* Or / Jaune de Shtaigen */
    --color-text: #333333;
    --color-light-bg: #f7f7f7;
    --color-dark-bg: #002244;
    --font-heading: 'Georgia', serif;
    --font-body: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --shadow-subtle: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-hero: 0 10px 30px rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-text);
    background-color: #ffffff;
    padding-bottom: 50px; /* Espace pour la section finale */
}

/* --- 2. Mise en Page Générale --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.section-header {
    text-align: center;
    padding: 60px 0 40px;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 2.5em;
    color: var(--color-primary);
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--color-secondary);
}

.section-header p {
    font-size: 1.1em;
    color: #666;
}

/* --- 3. Hero Section (Haut de Page) --- */
.hero {
    position: relative;
    height: 85vh; /* Grande hauteur pour un impact maximal */
    background-image: url('placeholder-background.jpg'); /* Image de fond conceptuelle ou motif abstrait */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Assombrir l'image de fond */
    backdrop-filter: blur(2px);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    padding: 20px;
    animation: fadeIn 2s ease-out;
}

.main-title {
    font-family: var(--font-heading);
    font-size: 8vw; /* Taille responsive */
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--color-secondary);
    text-shadow: var(--shadow-hero);
}

.subtitle {
    font-size: 1.8em;
    font-style: italic;
    margin-bottom: 40px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
}

.stat {
    background-color: rgba(255, 255, 255, 0.15);
    padding: 15px 30px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease;
}

.stat:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.25);
}

.stat-number {
    display: block;
    font-size: 2.5em;
    font-weight: bold;
    line-height: 1;
    color: var(--color-secondary);
}

.stat-label {
    display: block;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}

/* --- 4. Section Introduction --- */
.intro-section {
    text-align: center;
    padding: 80px 40px;
    background-color: var(--color-light-bg);
    border-radius: 15px;
    margin: -100px auto 50px; /* Remonter sur le hero */
    position: relative;
    z-index: 5;
    box-shadow: var(--shadow-subtle);
}

.intro-icon {
    font-size: 3em;
    margin-bottom: 15px;
    color: var(--color-primary);
}

.intro-section h2 {
    font-family: var(--font-heading);
    font-size: 2em;
    color: var(--color-primary);
    margin-bottom: 15px;
}

.intro-section p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.15em;
    line-height: 1.8;
}

/* --- 5. Section Le Rav --- */
.rav-section {
    padding: 50px 0;
}

.rav-card {
    display: flex;
    background: white;
    box-shadow: var(--shadow-subtle);
    border-radius: 10px;
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
    border-left: 5px solid var(--color-secondary);
}

.rav-image {
    flex: 0 0 35%;
    background-color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 6em;
}

.rav-content {
    flex: 1;
    padding: 30px;
}

.rav-content h2 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-size: 2em;
    margin-bottom: 5px;
}

.rav-title {
    color: var(--color-secondary);
    font-weight: bold;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-size: 0.9em;
}

.rav-description {
    margin-bottom: 25px;
}

.rav-quote {
    font-style: italic;
    padding: 15px;
    border-left: 3px solid var(--color-secondary);
    background-color: #fffbe6;
    color: var(--color-text);
}

/* --- 6. Section Les Étudiants (Grid) --- */
.students-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    padding: 30px 0;
}

.student-card {
    text-align: center;
    background-color: var(--color-light-bg);
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow-subtle);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.student-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 51, 102, 0.2); /* Ombre plus marquée */
}

.student-image {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    background-color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5em;
    color: var(--color-secondary);
    border: 3px solid var(--color-secondary);
}

.student-card h3 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    margin-bottom: 5px;
    font-size: 1.5em;
}

.student-trait {
    color: #999;
    font-style: italic;
    margin-bottom: 15px;
    display: block;
}

.student-desc {
    font-size: 0.9em;
    color: #666;
    height: 40px; /* Hauteur fixe pour alignement */
}

/* --- 7. Section L'Histoire (Timeline) --- */
.story-section {
    background-color: var(--color-primary);
    color: white;
    padding: 80px 0;
    margin-top: 50px;
}

.story-header {
    text-align: center;
    margin-bottom: 60px;
}

.story-header h2 {
    color: var(--color-secondary);
    font-family: var(--font-heading);
    font-size: 2.5em;
}

.book-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: var(--color-secondary);
}

.story-timeline {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.story-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    width: 2px;
    height: 100%;
    background: var(--color-secondary);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

/* Alternating sides for the timeline */
.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    width: 15px;
    height: 15px;
    background: var(--color-secondary);
    border: 3px solid white;
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 10;
    transition: background 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    background: white;
}

.timeline-content {
    width: 45%;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.timeline-item:hover .timeline-content {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.timeline-time {
    display: block;
    font-weight: bold;
    color: var(--color-secondary);
    margin-bottom: 5px;
}

.timeline-content h3 {
    font-family: var(--font-heading);
    font-size: 1.3em;
    margin-bottom: 5px;
}

/* Positioning content for alternating sides */
.timeline-item:nth-child(odd) .timeline-content {
    margin-right: 55%;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 55%;
    text-align: right;
}

/* --- 8. Section Les Questions --- */
.questions-section {
    padding: 50px 0;
}

.questions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 30px 0;
}

.question-card {
    background: var(--color-light-bg);
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow-subtle);
    border-top: 5px solid var(--color-primary);
    position: relative;
    min-height: 150px;
    transition: all 0.3s ease;
}

.question-card:hover {
    transform: scale(1.02);
    border-top-color: var(--color-secondary);
}

.question-number {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2em;
    color: rgba(0, 51, 102, 0.1);
    font-weight: bold;
}

.question-text {
    font-size: 1.1em;
    font-weight: bold;
    color: var(--color-primary);
    margin-bottom: 20px;
}

.question-author {
    display: block;
    font-size: 0.9em;
    font-style: italic;
    color: #999;
    position: absolute;
    bottom: 15px;
    right: 25px;
}

/* --- 9. Section Meter (Progression) --- */
.meter-section {
    text-align: center;
    padding: 50px 0;
    margin: 50px 0;
    background-color: var(--color-dark-bg);
    color: white;
}

.meter-section h3 {
    font-family: var(--font-heading);
    font-size: 1.8em;
    margin-bottom: 20px;
    color: var(--color-secondary);
}

.shtaigen-meter {
    max-width: 600px;
    height: 40px;
    background-color: #222;
    border-radius: 20px;
    margin: 0 auto 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.meter-fill {
    height: 100%;
    width: 100%; /* Démarrer à 100% ou utiliser JS pour l'animation */
    background: linear-gradient(90deg, #FFD700, #ffae00);
    transition: width 1.5s ease-out; /* Animation via JS */
}

.meter-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    color: var(--color-primary);
    z-index: 2;
    text-shadow: 0 0 5px white;
}

.meter-label {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--color-secondary);
}

/* --- 10. Section Blagues --- */
.jokes-section {
    padding: 50px 0;
}

.jokes-section h2 {
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 40px;
    font-family: var(--font-heading);
}

.joke-card {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    margin-bottom: 20px;
    background-color: var(--color-light-bg);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease;
}

.joke-card:hover {
    background-color: #ededed;
}

.joke-icon {
    font-size: 2em;
    flex-shrink: 0;
    margin-right: 15px;
    color: var(--color-secondary);
}

.joke-content {
    flex-grow: 1;
}

.joke-text {
    font-weight: bold;
    color: var(--color-primary);
    margin-bottom: 5px;
}

.joke-punchline {
    font-style: italic;
    color: #666;
}

/* --- 11. Section Finale --- */
.final-section {
    position: relative;
    background-color: var(--color-dark-bg);
    color: white;
    padding: 80px 20px;
    text-align: center;
    overflow: hidden;
    margin-top: 50px;
}

.final-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 215, 0, 0.1) 0%, rgba(0, 34, 68, 1) 70%);
    z-index: 1;
}

.final-content {
    position: relative;
    z-index: 2;
}

.final-icon {
    font-size: 3em;
    margin-bottom: 15px;
    color: var(--color-secondary);
}

.final-title {
    font-family: var(--font-heading);
    font-size: 3.5em;
    color: white;
    margin-bottom: 10px;
}

.final-subtitle, .final-subtitle-2 {
    font-size: 1.5em;
    font-style: italic;
    margin-bottom: 5px;
}

.final-subtitle-2 strong {
    color: var(--color-secondary);
    font-size: 1.2em;
    transition: transform 0.3s ease;
    display: inline-block;
}

.final-subtitle-2 strong:hover {
    transform: scale(1.1);
}

.final-signature {
    margin-top: 40px;
    font-size: 1.1em;
    color: var(--color-secondary);
}

/* --- 12. Media Queries (Responsiveness) --- */
@media (max-width: 900px) {
    .rav-card {
        flex-direction: column;
    }
    .rav-image {
        height: 200px;
        flex: auto;
    }
    .story-timeline::before {
        left: 5%; /* Déplacer la ligne à gauche */
    }
    .timeline-item {
        flex-direction: row !important; /* Forcer le flux de gauche à droite */
        justify-content: flex-start;
    }
    .timeline-dot {
        left: 5%;
    }
    .timeline-content {
        width: 85%;
        margin-left: 15% !important; /* Ajuster la marge */
        margin-right: 0 !important;
        text-align: left !important;
    }
}

@media (max-width: 600px) {
    .main-title {
        font-size: 12vw;
    }
    .subtitle {
        font-size: 1.4em;
    }
    .hero-stats {
        flex-direction: column;
        gap: 15px;
    }
    .stat {
        width: 80%;
    }
    .intro-section {
        padding: 50px 20px;
        margin-top: -50px;
    }
    .jokes-section {
        padding: 20px;
    }
}