* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
/* Hamburger Menu Icon */
.menu-icon {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.mobile-login {
    display: none;
}

.desktop-login {
    display: block;
}

.menu-icon span {
    width: 30px;
    height: 3px;
    background: var(--dark-gray);
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

:root {
    --primary-red: #e31837;
    --dark-gray: #222;
    --light-gray: #f5f5f5;
}

body {
    background-color: var(--light-gray);
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
}

header {
    background-color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo span {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-red);
}

.logo span a {
    color: inherit;
    text-decoration: none;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

nav a:hover, nav a.active {
    color: var(--primary-red);
    background-color: rgba(227, 24, 55, 0.1);
}

.login-btn {
    background-color: var(--primary-red);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.login-btn:hover {
    background-color: #c41230;
}

a .login-btn {
    text-decoration: none;
    display: inline-block;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    flex-grow: 1; 
}

.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-size: 3rem;
    color: var(--dark-gray);
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

.cta-btn {
    background-color: var(--primary-red);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 4px;
    font-size: 1.1rem;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.cta-btn:hover {
    background-color: #c41230;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.feature-card {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card h3 {
    color: var(--primary-red);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.feature-card p {
    color: #666;
}

/* Teachers Page Styles */
.search-section {
    margin-bottom: 2rem;
}

.search-bar {
    position: relative;
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-bar input[type="text"] {
    flex: 1;
    padding: 10px 35px 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.clear-btn {
    position: absolute;
    right: 110px;  /* Ajustement pour laisser de la place au bouton de recherche */
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    margin: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 2;
}

.clear-btn:hover {
    color: #333;
}

.search-bar:focus-within .clear-btn {
    display: block;
}

.search-bar input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.search-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.filters {
    display: flex;
    gap: 1rem;
}

.filters select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.teachers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.teacher-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.teacher-card:hover {
    transform: translateY(-5px);
}

.teacher-card img {
    border-radius: 50%;
    margin-bottom: 1rem;
}

.rating {
    margin: 1rem 0;
    color: #FFD700;
}

/* Rankings Page Styles */
.ranking-filters {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
}

.ranking-card {
    display: flex;
    align-items: center;
    background: white;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.ranking-card .rank {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-red);
    margin-right: 1rem;
    min-width: 50px;
}

.ranking-card img {
    border-radius: 50%;
    margin-right: 1rem;
}

.ranking-card.top {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: white;
}

/* Styles pour l'affichage des notes */
.rating-display {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.score {
    font-weight: bold;
    color: #333;
    min-width: 50px;
    display: inline-block;
}

/* Styles pour les étoiles de notation */
.stars {
    color: #FFD700; /* Couleur or pour les étoiles */
    font-size: 1.2em;
    letter-spacing: 2px;
    white-space: nowrap;
    display: inline-block;
    line-height: 1;
}

.ranking-card.top .rank {
    color: white;
}

/* Login Page Styles */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 100px);
}

.auth-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 2px solid #ddd;
}

.tab {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: var(--dark-gray);
}

.tab.active {
    color: var(--primary-red);
    border-bottom: 2px solid var(--primary-red);
    margin-bottom: -2px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--dark-gray);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.forgot-password {
    color: var(--primary-red);
    text-decoration: none;
}

/* About Page Styles */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.mission {
    text-align: center;
    margin-bottom: 4rem;
}

.mission h2 {
    color: var(--primary-red);
    margin-bottom: 1rem;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 4rem 0;
}

.contact-section {
    margin-top: 4rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.contact-form input,
.contact-form textarea {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

/* Media Queries for Responsive Design */
@media screen and (max-width: 1024px) {
    .features {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    main {
        padding: 1rem;
    }
}

@media screen and (max-width: 768px) {
    /* Existing Mobile Styles */
    .menu-icon {
        display: flex;
    }

    /* Teachers Page Mobile */
    .search-bar, .filters {
        flex-direction: column;
    }

    .teachers-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Rankings Page Mobile */
    .ranking-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .ranking-card img {
        margin: 1rem 0;
    }

    .ranking-card .rank {
        margin: 0 0 1rem 0;
    }

    /* About Page Mobile */
    .values-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 0 1rem;
    }
    .menu-icon {
        display: flex;
    }

    header {
        padding: 1rem;
        position: relative;
    }

    .desktop-login {
        display: none;
    }
    /*
    .mobile-login {
        display: block;
    }*/

    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
        padding: 1rem;
    }

    nav ul li {
        width: 100%;
        text-align: center;
    }

    nav a {
        display: block;
        padding: 1rem;
        width: 100%;
        text-align: center;
    }

    .mobile-login {
        margin-top: 1rem;
        display: flex;
        justify-content: center;
    }

    .mobile-login .login-btn {
        width: 80%;
        margin: 0 auto;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .feature-card {
        padding: 1.5rem;
    }
}

@media screen and (max-width: 480px) {
    .logo span {
        font-size: 1.2rem;
    }

    .logo img {
        width: 80px;
    }

    .login-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .cta-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
}
footer {
    text-align: center;
    padding: 2rem;
    background-color: #fff;
    color: #666;
    margin-top: 3rem;
    border-top: 1px solid #f0f0f0;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
}

.footer-lang-switcher {
    margin-top: 1rem;
}

.footer-lang-switcher label {
    margin-right: 0.5rem;
    color: var(--dark-gray);
}

.footer-lang-switcher select {
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.5rem;
    cursor: pointer;
    background: transparent;
    color: var(--dark-gray);
}

/* Teacher Profile Page Styles */
.teacher-profile {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.teacher-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.teacher-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.teacher-info h1 {
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.teacher-info .subject {
    color: var(--primary-red);
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.teacher-info .bio {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.cult-phrase {
    border-left: 4px solid var(--primary-red);
    padding-left: 1rem;
    font-style: italic;
    color: #555;
    margin: 1rem 0;
}

/* Login Required Section */
.login-required {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.login-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem;
    border-radius: 16px;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.lock-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.login-card h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.login-card p {
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.login-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.login-actions .cta-btn.primary {
    background: white;
    color: var(--primary-red);
    font-weight: 600;
}

.login-actions .cta-btn.secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    font-weight: 600;
}

.login-actions .cta-btn.secondary:hover {
    background: white;
    color: var(--primary-red);
}

.login-hint {
    font-size: 0.9rem;
    opacity: 0.8;
    font-style: italic;
}

/* Voting Section */
.voting-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.voting-form {
    margin-top: 1.5rem;
}

.criteria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.criterion {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-red);
}

.criterion label {
    display: block;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 1rem;
}

.rating-input {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.rating-input input[type="radio"] {
    display: none;
}

.rating-input label {
    width: 40px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    margin: 0;
}

.rating-input input[type="radio"]:checked + label {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
}

.rating-input label:hover {
    border-color: var(--primary-red);
    transform: scale(1.1);
}

/* Ratings Summary */
.ratings-summary {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.ratings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.rating-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid var(--primary-red);
}

.rating-item .label {
    font-weight: 500;
    color: var(--dark-gray);
}

.rating-item .score {
    font-weight: 600;
    color: var(--primary-red);
    font-size: 1.1rem;
}

.rating-item .stars {
    color: #FFD700;
    font-size: 1.2rem;
}

/* Responsive Design for Profile Page */
@media screen and (max-width: 768px) {
    .teacher-header {
        flex-direction: column;
        text-align: center;
    }
    
    .teacher-photo {
        margin: 0 auto;
    }
    
    .criteria-grid {
        grid-template-columns: 1fr;
    }
    
    .login-card {
        margin: 1rem;
        padding: 2rem;
    }
    
    .login-actions {
        flex-direction: column;
    }
    
    .ratings-grid {
        grid-template-columns: 1fr;
    }
}