/* Reset basique */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f3f4f6;
    color: #1f2937;
    line-height: 1.6;
    padding-top: 180px;
    padding-bottom: 50px;
}

/* --- HEADER --- */
header {
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    color: white;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    padding: 20px 0;
    height: auto;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 0 20px;
    width: 100%;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
}

.text-center { text-align: center; }

.logo-text {
    font-weight: 800;
    font-size: 2rem;
    letter-spacing: -0.5px;
    margin-bottom: 5px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.slogan {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

/* Éléments cachés sur PC */
.hamburger-btn { display: none; }
.close-menu-btn { display: none; }
.menu-overlay { display: none; }

/* --- BARRE DE CONTRÔLE CENTRALE --- */
.controls-bar-transparent {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
    width: 100%;
}

.group-center {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- BOUTONS --- */
.glass-btn {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 14px 28px;
    font-size: 1.1rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: white;
    transform: translateY(-2px);
}

.glass-btn.active {
    background: white;
    color: #4f46e5;
    font-weight: 800;
    border-color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* --- RESTE DU SITE --- */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    padding-top: 20px;
}

.tool-wrapper {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
    margin-top: 0;
}

.input-area { margin-bottom: 30px; }

textarea {
    width: 100%;
    height: 250px;
    padding: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1.1rem;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
}
textarea:focus { border-color: #4f46e5; }

.results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.card {
    background: #f8fafc;
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid #e2e8f0;
}
.card span {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 5px;
}
.card label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
    letter-spacing: 1px;
}
.card.highlight { background: #eff6ff; border-color: #3b82f6; }
.card.highlight span { color: #2563eb; }

/* --- HISTORIQUE (CLASSEMENTS) --- */
.history-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px dashed #e2e8f0;
}

.history-section.hidden {
    display: none !important;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.history-header h3 {
    color: #0f172a;
    font-size: 1.3rem;
}

.history-filters {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid #cbd5e1;
    background: white;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover { background: #f8fafc; }
.filter-btn.active {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.score-list {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid #e2e8f0;
    font-weight: 700;
    color: #334155;
    font-size: 1.1rem;
}

.rank-number {
    display: inline-block;
    width: 35px;
    margin-right: 15px;
}

.rank-1 .rank-number { color: #fbbf24; }
.rank-2 .rank-number { color: #9ca3af; }
.rank-3 .rank-number { color: #b45309; }

.btn-delete {
    background: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
    opacity: 0.7;
}
.btn-delete:hover {
    transform: scale(1.1);
    opacity: 1;
}

.btn-clear-all {
    width: 100%;
    padding: 12px;
    background: #ef4444; 
    border: none;
    color: white;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}

/* --- STYLE DU CONTENU SEO --- */
.seo-content {
    margin-top: 60px;
    color: #4b5563;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.content-block {
    margin-bottom: 30px;
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #4f46e5;
}

.content-block p { text-align: justify; }

.seo-content h2 {
    color: #111827;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.seo-content ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-top: 10px;
}

.seo-content li {
    margin-bottom: 8px;
    text-align: justify;
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 50px 20px;
    color: #9ca3af;
    border-top: 1px solid #e5e7eb;
    margin-top: 60px;
    background: white;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #f3f4f6;
    color: #6b7280;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.social-youtube:hover { background-color: #ff0000; color: white; transform: translateY(-5px); box-shadow: 0 5px 15px rgba(255, 0, 0, 0.3); }
.social-tiktok:hover { background-color: #010101; color: #ffffff; transform: translateY(-5px); box-shadow: -3px -3px 0px #00f2ea, 3px 3px 0px #ff0050; }
.social-instagram:hover { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); color: white; transform: translateY(-5px); box-shadow: 0 5px 15px rgba(220, 39, 67, 0.3); }
.social-facebook:hover { background-color: #1877f2; color: white; transform: translateY(-5px); box-shadow: 0 5px 15px rgba(24, 119, 242, 0.3); }

.footer-links {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}
.footer-links a:hover { color: #4f46e5; text-decoration: underline; }

footer p { font-size: 0.85rem; opacity: 0.8; }


/* ========================================================
   RESPONSIVE DESIGN (MENU BURGER POUR MOBILE)
======================================================== */

@media (max-width: 1000px) {
    body { 
        padding-top: 150px; 
    }
    
    header {
        padding: 15px 0;
    }

    /* On force l'alignement à gauche, bouton PUIS texte */
    .header-top {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        width: 100%;
        text-align: left;
        gap: 15px; /* Espace entre le bouton et le texte */
    }
    
    .text-center {
        text-align: left;
    }

    .logo-text {
        font-size: 1.6rem; 
        margin-bottom: 2px;
    }
    
    .slogan {
        font-size: 0.8rem;
    }

    /* Le Bouton Burger (A gauche !) */
    .hamburger-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0; /* Suppression du padding superflu */
    }

    /* Le Menu Coulissant (Caché à gauche) */
    .controls-bar-transparent {
        position: fixed;
        top: 0;
        left: -300px; 
        width: 280px;
        height: 100vh;
        background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 80px 20px 20px 20px;
        transition: left 0.3s ease;
        z-index: 2000;
        box-shadow: 2px 0 15px rgba(0,0,0,0.2);
    }

    .controls-bar-transparent.open {
        left: 0;
    }

    .close-menu-btn {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
        background: transparent;
        border: none;
        color: white;
        font-size: 2.5rem;
        cursor: pointer;
        line-height: 1;
    }

    .group-center {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }

    .glass-btn {
        width: 100%;
        text-align: left;
        justify-content: flex-start;
        padding: 15px;
    }

    .menu-overlay.show {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: 1999;
    }

    .results { 
        grid-template-columns: 1fr; 
    }
    
    .history-header { 
        flex-direction: column; 
        justify-content: center; 
        gap: 15px;
    }

    .history-filters {
        width: 100%;
        justify-content: center;
    }
}

/* Très petits écrans (Smartphones en portrait) */
@media (max-width: 480px) {
    .tool-wrapper {
        padding: 20px; 
    }
    textarea {
        height: 200px;
    }
}