/* =========================================
   1. GESTION DE L'AFFICHAGE (OBLIGATOIRE)
   ========================================= */
.hidden-section {
    display: none !important;
}

.active-section {
    display: block !important;
}

/* =========================================
   2. CONFIGURATION GÉNÉRALE
   ========================================= */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0d1117;
    color: white;
    overflow-x: hidden;
}

/* STYLE DU BOUTON RETOUR (FIXE) */
.btn-back {
    position: fixed; 
    top: 20px;
    left: 20px;
    background: #ff8a00;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    z-index: 9999; 
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: 0.3s;
}

.btn-back:hover {
    background: #e52e71;
    transform: scale(1.05);
}

/* =========================================
   3. PAGE 1 : LOGIN
   ========================================= */
#page-login {
    background: url('bg-login.jpg.png') no-repeat center center/cover;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: rgba(0, 0, 0, 0.6);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 400px;
    width: 90%;
}

.logo-text {
    font-family: serif;
    font-size: 3em;
    color: #e0c3fc;
    text-shadow: 0 0 10px #8ec5fc;
    margin: 0;
}

.slogan {
    font-size: 0.9em;
    font-style: italic;
    color: #ddd;
    margin-bottom: 30px;
}

.input-group { text-align: left; margin-bottom: 15px; }
.input-group label { display: block; font-size: 0.8em; margin-bottom: 5px; }
.input-group input {
    width: 100%; box-sizing: border-box; padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #555; border-radius: 5px; color: white;
}

.options {
    display: flex; justify-content: space-between;
    font-size: 0.8em; margin-bottom: 20px; color: #ccc;
}
.options a { color: #ccc; text-decoration: none; }

.btn-main {
    width: 100%; padding: 12px;
    background: linear-gradient(90deg, #ff8a00, #e52e71);
    border: none; border-radius: 5px; color: white;
    font-weight: bold; cursor: pointer; margin-top: 10px;
}

/* =========================================
   4. PAGE 2 : PRÉSENTATION
   ========================================= */
#page-presentation {
    background: url('bg-intro.jpg.png') no-repeat center center/cover;
    min-height: 100vh; padding: 40px 20px;
    text-align: center; background-attachment: fixed;
}

.content-box {
    max-width: 800px; margin: 0 auto; margin-top: 50px;
    background: rgba(0,0,0,0.7);
    padding: 30px; border-radius: 15px;
}

.btn-glow {
    background: white; color: black;
    padding: 15px 40px; font-size: 1.2em;
    border: none; border-radius: 30px;
    cursor: pointer; margin-top: 20px; font-weight: bold;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

/* =========================================
   5. PAGE 3 : LISTE DES FORMATIONS
   ========================================= */
#page-courses {
    background: url('bg-courses.jpg.png') no-repeat center center/cover;
    min-height: 100vh; padding: 20px;
    background-attachment: fixed;
}

.header-courses h2 {
    text-align: center; color: #ff00cc;
    text-shadow: 0 0 5px #333;
    font-family: 'Courier New', Courier, monospace; margin-bottom: 30px;
    margin-top: 60px; /* Espace pour le bouton retour */
}
.header-courses h2 span { display: block; font-size: 0.8em; color: white; }

.search-bar { display: flex; justify-content: center; margin: 20px 0; }
.search-bar input { width: 70%; padding: 12px; border-radius: 20px 0 0 20px; border: none; outline: none; }
.search-bar button { padding: 10px 25px; border-radius: 0 20px 20px 0; border: none; background: #4facfe; color: white; cursor: pointer; }

.courses-list {
    max-width: 800px; margin: 0 auto;
    background: rgba(0,0,0,0.6);
    padding: 20px; border-radius: 10px;
}

.course-item {
    padding: 15px; margin-bottom: 10px;
    background: rgba(255,255,255,0.1);
    cursor: pointer; transition: 0.3s;
    border-left: 4px solid transparent; border-radius: 5px;
}
.course-item:hover { background: rgba(255,255,255,0.2); border-left: 4px solid #ff8a00; }
.footer-text { text-align: center; font-size: 0.9em; color: #ddd; margin-top: 20px; }

/* =========================================
   6. PAGE 4 : TIMELINE (CONTENU)
   ========================================= */
#page-content {
    background-color: #fdfbf7;
    background-image: radial-gradient(#e0e0e0 1px, transparent 1px);
    background-size: 20px 20px;
    color: #333; min-height: 100vh;
    padding: 40px 20px; font-family: 'Georgia', serif;
}

#courseTitleDisplay {
    text-align: center; color: #c7913d;
    font-size: 2em; margin-bottom: 50px; margin-top: 40px;
    text-transform: uppercase; letter-spacing: 2px;
    border-bottom: 2px solid #c7913d;
    display: inline-block; padding-bottom: 10px; width: 100%;
}

.timeline-container {
    max-width: 800px; margin: 0 auto;
    position: relative; padding-left: 20px;
}

/* La ligne verticale */
.timeline-container::before {
    content: ''; position: absolute;
    left: 48px; top: 0; bottom: 0;
    width: 4px; background: #dcdcdc;
    border-radius: 2px; z-index: 0;
}

.thier-block {
    display: flex; align-items: flex-start;
    margin-bottom: 40px; position: relative; z-index: 1;
}

.thier-icon {
    width: 60px; height: 60px; border-radius: 50%;
    background: white; border: 4px solid;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-right: 30px; flex-shrink: 0;
}

.thier-card {
    flex-grow: 1; background: white;
    border-radius: 15px 50px 15px 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    overflow: hidden; cursor: pointer;
    transition: transform 0.2s; border: 1px solid #eee;
}
.thier-card:hover { transform: translateY(-3px); }

.thier-header {
    padding: 15px 25px; color: white;
    font-weight: bold; font-size: 1.3em;
    display: flex; justify-content: space-between;
    align-items: center; font-family: 'Segoe UI', sans-serif;
}

.thier-body {
    padding: 20px 25px; font-size: 1.1em;
    line-height: 1.6; color: #555;
    display: none; border-top: 1px solid rgba(0,0,0,0.05);
}

/* Couleurs JS */
.color-blue { border-color: #1e3c72; color: #1e3c72; }
.bg-blue { background: linear-gradient(90deg, #1e3c72, #2a5298); }
.color-green { border-color: #1d6f42; color: #1d6f42; }
.bg-green { background: linear-gradient(90deg, #1d6f42, #43a047); }
.color-gold { border-color: #c7913d; color: #c7913d; }
.bg-gold { background: linear-gradient(90deg, #c7913d, #e6b800); }

/* =========================================
   STYLE DE LA LISTE DE RECHERCHE
   ========================================= */
.suggestions-list {
    position: absolute;
    top: 100%; left: 15%; width: 70%;
    background: white; border-radius: 0 0 15px 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 1000; max-height: 300px; overflow-y: auto;
    display: none; text-align: left;
}

.suggestion-item {
    padding: 12px 20px; cursor: pointer;
    border-bottom: 1px solid #eee; color: #333;
    font-size: 0.95em; font-family: 'Segoe UI', sans-serif;
    display: flex; align-items: center;
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background-color: #f1f1f1; color: #000; }
.suggestion-icon { margin-right: 10px; color: #888; }

/* =========================================
   7. STYLE RENCONTRE (TINDER LIKE)
   ========================================= */
#page-dating {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dating-container {
    width: 100%;
    max-width: 400px;
    text-align: center;
    padding: 20px;
}

.dating-title {
    font-family: 'Segoe UI', sans-serif;
    font-size: 2.5em;
    color: #ff4b2b;
    text-shadow: 2px 2px 0px white;
    margin-bottom: 20px;
}

.dating-card-form {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    color: #333;
}

.dating-card-form input, .dating-card-form select, .dating-card-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-sizing: border-box;
}

.btn-upload {
    display: inline-block;
    padding: 10px 20px;
    background: #eee;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    color: #555;
}

/* CARTE PROFIL (SWIPE) */
.tinder-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    position: relative;
    height: 500px;
    display: flex;
    flex-direction: column;
}

.tinder-img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.tinder-info {
    padding: 20px;
    text-align: left;
}

.tinder-name { font-size: 1.5em; font-weight: bold; color: #333; }
.tinder-age { font-size: 1.2em; color: #888; margin-left: 10px; }
.tinder-bio { color: #666; margin-top: 10px; font-size: 0.95em; }

.dating-controls {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
}

.btn-action {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    font-size: 24px;
    cursor: pointer;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.btn-action:hover { transform: scale(1.1); }
.pass { color: red; border: 2px solid #ffcccc; }
.like { color: #4caf50; border: 2px solid #c8e6c9; }
