/* --- VARIABLES --- */
:root {
    --primary-blue: #1877F2;
    --light-blue: #e7f3ff;
    --white: #ffffff;
    --text-dark: #1c1e21;
    --text-gray: #65676b;
    --bg-gray: #f0f2f5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--white);
    color: var(--text-dark);
    overflow-x: hidden; /* Empêche le défilement horizontal */
}

/* --- NAVIGATION --- */
header {
    background-color: var(--primary-blue);
    padding: 15px 50px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-container {
    color: var(--white);
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

/* --- HERO SECTION & MINUTEUR --- */
.hero {
    background: linear-gradient(135deg, var(--white) 0%, var(--light-blue) 100%);
    text-align: center;
    padding: 100px 20px;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3.5rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto 40px auto;
}

.countdown-container {
    background: var(--white);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(24, 119, 242, 0.15);
    display: inline-block;
    margin-bottom: 40px;
    width: auto;
    max-width: 100%;
}

.countdown-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

#countdown {
    display: flex;
    gap: 20px;
    justify-content: center;
}

#countdown div {
    text-align: center;
}

#countdown span {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-blue);
    display: block;
}

.sound-toggle {
    background: var(--light-blue);
    border: none;
    color: var(--primary-blue);
    font-size: 1.2rem;
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
}

.sound-toggle:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: scale(1.1);
}

/* --- BOUTONS --- */
.store-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn {
    padding: 15px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: transform 0.3s, box-shadow 0.3s;
    display: inline-block;
    cursor: pointer;
    border: none;
}

.btn-store {
    background-color: var(--text-dark);
    color: var(--white);
}

.btn-store:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--white);
}

/* --- LISTE D'ATTENTE --- */
.waitlist-wrapper {
    position: relative;
    background-color: #ffffff !important;
    padding: 30px;
    border-radius: 15px;
    margin: 50px auto 0 auto;
    max-width: 600px;
    width: 100%;
    z-index: 1;
    border: 1px solid rgba(24, 119, 242, 0.1);
}

.waitlist-title {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.waitlist-title strong {
    color: var(--primary-blue);
    font-size: 1.5rem;
}

.waitlist-form {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.waitlist-form input {
    padding: 15px 20px;
    border: 1px solid #cce0f5;
    border-radius: 30px;
    outline: none;
    font-size: 1rem;
    flex: 1;
    width: 100%;
}

.waitlist-form input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 5px rgba(24, 119, 242, 0.3);
}

.success-text {
    color: #28a745;
    font-weight: bold;
    margin-top: 15px;
    animation: fadeInUp 0.5s ease-out;
}

/* --- FONCTIONNALITÉS --- */
.features-section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--text-dark);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--white);
    padding: 40px 20px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
}

/* --- CERTIFICATION --- */
.verified-section {
    background-color: var(--bg-gray);
    padding: 80px 20px;
    text-align: center;
}

.verified-content {
    background: var(--white);
    max-width: 600px;
    margin: 0 auto;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.price-tag {
    font-size: 1.5rem;
    margin: 20px 0 30px 0;
}

.price-tag span {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-blue);
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 30px;
    background: var(--text-dark);
    color: var(--white);
}

footer a {
    color: var(--primary-blue);
    text-decoration: none;
}

/* =========================================
   BACK-END INTERFACE (ADMIN PANEL)
   ========================================= */
.hidden {
    display: none !important;
}

#backend-interface {
    display: flex;
    height: 100vh;
    background-color: #f4f6f9;
}

.admin-sidebar {
    width: 250px;
    background-color: #343a40;
    color: #fff;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.admin-logo {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 30px;
    color: var(--primary-blue);
}

.admin-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.admin-menu li {
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
}

.admin-menu li:hover, .admin-menu li.active {
    background-color: var(--primary-blue);
}

.admin-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.admin-stats {
    display: flex;
    gap: 20px;
}

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    flex: 1;
}

.stat-card p {
    font-size: 2rem;
    font-weight: bold;
    color: #343a40;
}

.admin-data-section {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-top: 30px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th, .admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #f0f2f5;
}

.admin-table th {
    background-color: var(--light-blue);
    color: var(--primary-blue);
}

/* =========================================
   MODALS (POLITIQUE & CGU)
   ========================================= */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background-color: var(--white);
    width: 100%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 40px;
    border-radius: 15px;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 35px;
    cursor: pointer;
    color: var(--text-gray);
}


/* =========================================================================
   📱 RESPONSIVE DESIGN : ADAPTATION TABLETTE & MOBILE 
   ========================================================================= */

/* --- TABLETTES (Moins de 1024px) --- */
@media (max-width: 1024px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- SMARTPHONES (Moins de 768px) --- */
@media (max-width: 768px) {
    
    /* En-tête : on centre le logo et les liens se placent en dessous */
    header {
        padding: 15px 20px;
    }
    nav {
        flex-direction: column;
        gap: 15px;
    }
    .nav-links {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
        font-size: 0.9rem;
    }

    /* Hero Section : Textes plus petits pour mobile */
    .hero {
        padding: 50px 15px;
    }
    .hero-content h1 {
        font-size: 2.2rem;
    }
    .hero-content p {
        font-size: 1rem;
    }

    /* Minuteur : Réduction de la taille pour qu'il rentre dans l'écran */
    .countdown-container {
        padding: 15px 10px;
        width: 100%;
    }
    .countdown-header h3 {
        font-size: 1rem;
        text-align: center;
    }
    #countdown {
        gap: 10px;
    }
    #countdown span {
        font-size: 1.8rem;
    }
    #countdown p {
        font-size: 0.8rem;
    }

    /* Boutons Stores : l'un en dessous de l'autre prenant 100% de la largeur */
    .store-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    .btn {
        width: 100%;
        text-align: center;
    }

    /* Liste d'attente : Les champs (nom, email, bouton) s'empilent verticalement */
    .waitlist-wrapper {
        padding: 20px 15px;
        margin-top: 30px;
    }
    .waitlist-form {
        flex-direction: column;
    }
    .waitlist-form input, .waitlist-form button {
        width: 100%;
    }

    /* Features / Grille : 1 seule colonne */
    .features-grid {
        grid-template-columns: 1fr;
    }
    .section-title {
        font-size: 2rem;
    }

    /* Admin Panel : Refonte totale pour que ça ne coupe pas sur mobile ! */
    #backend-interface {
        flex-direction: column; /* La barre latérale passe en HAUT */
        height: auto;
        min-height: 100vh;
    }
    
    .admin-sidebar {
        width: 100%; /* Prend toute la largeur */
        padding: 15px;
    }
    
    /* Le menu admin devient un menu déroulant horizontal stylé */
    .admin-menu {
        flex-direction: row;
        overflow-x: auto; /* Permet de scroller le menu de gauche à droite */
        gap: 10px;
        padding-bottom: 5px;
    }
    
    .admin-menu li {
        margin-bottom: 0;
        white-space: nowrap; /* Empêche le texte du menu de se casser en deux */
        font-size: 0.9rem;
        padding: 10px 15px;
    }

    .admin-content {
        padding: 15px;
    }

    /* Les cartes de statistiques s'empilent */
    .admin-stats {
        flex-direction: column;
    }

    /* Le tableau admin obtient une barre de défilement horizontale propre */
    .admin-data-section {
        overflow-x: auto; 
        padding: 15px;
    }
    .admin-table th, .admin-table td {
        white-space: nowrap; /* Empêche l'écrasement des colonnes */
        padding: 10px;
    }

    /* Modales (Fenêtres pop-up) */
    .modal-content {
        padding: 20px;
    }
    .close-btn {
        top: 10px;
        right: 15px;
    }
}
