* {
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}

.d-flex {
    display: flex;
}

.j-center {
    justify-content: center;
}

.j-sb {
    justify-content: space-between;
}

.a-center {
    align-items: center;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 3rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.header-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 2rem;
}

.header-container .title {
    justify-self: start;
}

.header-container .nav {
    justify-self: center;
}

.header-container .auth-links {
    justify-self: end;
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header .title h1 {
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

header.scrolled .title h1 {
    color: #000000;
}

.header-title {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

header.scrolled .header-title {
    color: #000000;
}

header nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

header nav ul li a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s ease;
}

header.scrolled nav ul li a {
    color: #000000;
}

header nav ul li a:hover {
    opacity: 0.8;
}

.auth-links {
    display: flex;
    gap: 1.5rem;
    position: relative;
}

.auth-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    border: 2px solid #ffffff;
    transition: all 0.3s ease;
}

/* Menu déroulant utilisateur */
.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    color: #ffffff;
    background: transparent;
    border: 2px solid #ffffff;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.user-dropdown-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.user-dropdown.active .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1.25rem;
    color: #333 !important;
    text-decoration: none;
    transition: background 0.2s ease;
    font-size: 0.95rem;
    white-space: nowrap;
    border: none !important;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-divider {
    height: 1px;
    background: #e9ecef;
    margin: 0;
}

header.scrolled .auth-links a {
    color: #000000;
    border-color: #000000;
}

header.scrolled .user-dropdown-toggle {
    color: #000000;
    border-color: #000000;
}

header.scrolled .user-dropdown-toggle:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.auth-links a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

header.scrolled .auth-links a:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Dropdowns de navigation */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    color: #ffffff;
    background: transparent;
    border: none;
    padding: 0;
    font-weight: 500;
    cursor: pointer;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.nav-dropdown-toggle:hover {
    opacity: 0.8;
}

header.scrolled .nav-dropdown-toggle {
    color: #000000;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.nav-dropdown.active .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #d946ef 0%, #ff8a5b 25%, #ff5e9d 50%, #8f52ff 100%);
}

.hero-animated::before {
    content: "";
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.05) 0%,
        transparent 40%,
        transparent 60%,
        rgba(255, 255, 255, 0.05) 100%
    );
    animation: wave 15s ease-in-out infinite;
    z-index: 0;
}

.hero-animated::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        -45deg,
        rgba(138, 43, 226, 0.15) 0%,
        transparent 40%,
        transparent 60%,
        rgba(236, 72, 153, 0.15) 100%
    );
    animation: wave 20s ease-in-out infinite reverse;
    z-index: 0;
}

.hero-admin {
    background: linear-gradient(135deg, #667eea 0%, #a76480 50%, #f5576c 100%);
}

.hero-admin::before {
    content: "";
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        45deg,
        rgba(102, 126, 234, 0.15) 0%,
        transparent 40%,
        transparent 60%,
        rgba(245, 87, 108, 0.15) 100%
    );
    animation: wave 12s ease-in-out infinite;
    z-index: 0;
}

.hero-admin::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        -45deg,
        rgba(118, 75, 162, 0.2) 0%,
        transparent 40%,
        transparent 60%,
        rgba(102, 126, 234, 0.2) 100%
    );
    animation: wave 18s ease-in-out infinite reverse;
    z-index: 0;
}

.hero-green {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.hero-green::before {
    background: linear-gradient(
        45deg,
        rgba(56, 239, 125, 0.1) 0%,
        transparent 40%,
        transparent 60%,
        rgba(17, 153, 142, 0.1) 100%
    );
}

.hero-green::after {
    background: linear-gradient(
        -45deg,
        rgba(17, 153, 142, 0.15) 0%,
        transparent 40%,
        transparent 60%,
        rgba(56, 239, 125, 0.15) 100%
    );
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, transparent 30%);
    z-index: -1;
}

.hero-content {
    text-align: center;
    z-index: 1;
    position: relative;
}

.header-a {
    font-size: 1.2rem;
}

.header-title {
    font-size: 2rem;
    color: #ffffff;
    margin-bottom: 1rem;
    text-decoration: none;
}

.hero-title {
    font-size: 5rem;
    font-weight: 800;
    color: #ffffff;
    text-decoration: none;
    animation: fadeInUp 1s ease;
}

.hero-title a {
    color: #ffffff;
    text-decoration: none;
}

/* Gradient blanc sur "Faster" */
.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Section contenu */
.content {
    min-height: 100vh;
    background-color: #ffffff;
    padding: 4rem 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.container h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: #1a1a1a;
}

/* Grille de projets */
.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    margin-top: 2rem;
}

/* Cartes de projet */
.project-card {
    position: relative;
    width: 60%;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(50px);
}

/* Position des cartes */
.project-card.left {
    align-self: flex-start;
    margin-left: 0;
}

.project-card.right {
    align-self: flex-end;
    margin-right: 0;
}

/* Animation d'apparition */
.project-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* Image de fond */
.card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .card-bg {
    transform: scale(1.1);
}

/* Overlay gradient */
.project-card .card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
}

/* Texte sur l'image */
.card-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem;
    z-index: 2;
    color: #ffffff;
}

.card-text h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.card-text p {
    font-size: 1rem;
    line-height: 1.6;
    color: #f0f0f0;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}


/* Footer */
footer {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 3rem 2rem;
}

/* Auth pages */
.auth-section {
    min-height: 100vh;
    padding: 6rem 1rem 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #d946ef 0%, #ff8a5b 25%, #ff5e9d 50%, #8f52ff 100%);
    position: relative;
    overflow: hidden;
}

.auth-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.05) 0%,
        transparent 40%,
        transparent 60%,
        rgba(255, 255, 255, 0.05) 100%
    );
    animation: wave 15s ease-in-out infinite;
    z-index: 0;
}

.auth-section::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        -45deg,
        rgba(138, 43, 226, 0.15) 0%,
        transparent 40%,
        transparent 60%,
        rgba(236, 72, 153, 0.15) 100%
    );
    animation: wave 20s ease-in-out infinite reverse;
    z-index: 0;
}

@keyframes wave {
    0%, 100% {
        transform: translateX(0) translateY(0) rotate(0deg);
    }
    25% {
        transform: translateX(10%) translateY(-5%) rotate(1deg);
    }
    50% {
        transform: translateX(0) translateY(-10%) rotate(-1deg);
    }
    75% {
        transform: translateX(-10%) translateY(-5%) rotate(0.5deg);
    }
}

.auth-shell {
    position: relative;
    width: 100%;
    max-width: 520px;
    z-index: 1;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 3rem 2.5rem;
    color: #2d2d2d;
    position: relative;
    border-radius: 24px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.25);
}

.auth-card h2 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: #2d2d2d;
    font-weight: 700;
    text-align: center;
}

.auth-card .lead {
    display: none;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.auth-form label {
    font-weight: 600;
    color: #2d2d2d;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: block;
}

.auth-form input {
    width: 100%;
    padding: 0.95rem 1.2rem;
    border-radius: 14px;
    border: 1px solid #e0e0e0;
    background: #f8f8f8;
    color: #2d2d2d;
    font-size: 0.95rem;
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: #ff5e9d;
    box-shadow: 0 0 0 3px rgba(255, 94, 157, 0.1);
    background: #ffffff;
}

.btn-primary {
    width: 100%;
    padding: 1rem 1.2rem;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #ff8a5b 0%, #ff4d79 50%, #8f4bff 100%);
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    letter-spacing: 0.8px;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.95rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    margin-top: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(255, 109, 143, 0.4);
    filter: brightness(1.05);
}

.google-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 0.95rem 1.2rem;
    border-radius: 14px;
    background: #ffffff;
    color: #2d2d2d;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 1rem;
}

.google-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.google-icon {
    display: inline-flex;
    width: 22px;
    height: 22px;
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    color: #7a7a7a;
    font-size: 0.95rem;
}

.auth-switch a {
    color: #ff4d79;
    text-decoration: none;
    font-weight: 700;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.alert {
    padding: 0.9rem 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.alert.error {
    background: rgba(255, 105, 97, 0.12);
    border: 1px solid rgba(255, 105, 97, 0.4);
    color: #ffc6c2;
}

.user-name {
    color: #ffffff;
    font-weight: 600;
}

header.scrolled .user-name {
    color: #000000;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section {
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Réseaux sociaux */
.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.social-links a {
    display: inline-block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-5px);
    opacity: 0.8;
}

.social-links img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    color: #999999;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
    
    .project-card {
        width: 70%;
    }
    
    .card-text h2 {
        font-size: 1.6rem;
    }
    
    .auth-shell {
        max-width: 460px;
    }
    
    .auth-card {
        padding: 2.5rem 2rem;
    }
}

@media (max-width: 768px) {
    header {
        padding: 0.8rem 1rem;
    }
    
    header .d-flex {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    header .title {
        order: 1;
        flex: 1 1 100%;
        text-align: center;
    }
    
    header .title h1 {
        font-size: 1.3rem;
    }
    
    header nav {
        order: 3;
        flex: 1 1 100%;
    }
    
    header nav ul {
        justify-content: center;
        gap: 1rem;
    }
    
    header nav ul li a {
        font-size: 0.85rem;
    }
    
    .auth-links {
        order: 2;
        flex: 1 1 100%;
        justify-content: center;
        gap: 1rem;
    }
    
    .auth-links a {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .content {
        padding: 3rem 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .container h1 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .projects-grid {
        gap: 3rem;
    }
    
    .project-card {
        width: 100% !important;
        height: 350px;
        align-self: center !important;
        margin: 0 !important;
    }
    
    .card-text {
        padding: 1.5rem;
    }
    
    .card-text h2 {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }
    
    .card-text p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    footer {
        padding: 2rem 1rem;
    }
    
    .social-links {
        gap: 1.5rem;
    }
    
    .social-links img {
        width: 45px;
        height: 45px;
    }
    
    /* Auth responsive */
    .auth-section {
        padding: 8rem 1rem 2rem;
    }
    
    .auth-shell {
        max-width: 100%;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }
    
    .auth-card h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .auth-form {
        gap: 0.9rem;
    }
    
    .auth-form label {
        font-size: 0.9rem;
    }
    
    .auth-form input {
        padding: 0.85rem 1rem;
        font-size: 0.9rem;
    }
    
    .btn-primary {
        padding: 0.9rem 1rem;
        font-size: 0.9rem;
    }
    
    .google-btn {
        padding: 0.85rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 0.6rem 0.8rem;
    }
    
    header .d-flex {
        gap: 0.5rem;
    }
    
    header .title h1 {
        font-size: 1.1rem;
    }
    
    header nav ul {
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    header nav ul li a {
        font-size: 0.75rem;
    }
    
    .auth-links {
        gap: 0.5rem;
    }
    
    .auth-links a {
        padding: 0.3rem 0.7rem;
        font-size: 0.7rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .content {
        padding: 2rem 0.5rem;
    }
    
    .container h1 {
        font-size: 1.6rem;
    }
    
    .project-card {
        height: 300px;
    }
    
    .card-text {
        padding: 1.2rem;
    }
    
    .card-text h2 {
        font-size: 1.1rem;
    }
    
    .card-text p {
        font-size: 0.85rem;
    }
    
    .social-links {
        gap: 1rem;
    }
    
    .social-links img {
        width: 40px;
        height: 40px;
    }
    
    .footer-bottom p {
        font-size: 0.8rem;
    }
    
    /* Auth responsive mobile */
    .auth-section {
        padding: 7rem 0.8rem 1.5rem;
    }
    
    .auth-card {
        padding: 1.8rem 1.2rem;
        border-radius: 18px;
    }
    
    .auth-card h2 {
        font-size: 1.6rem;
        margin-bottom: 1.2rem;
    }
    
    .auth-form {
        gap: 0.8rem;
    }
    
    .auth-form label {
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
    }
    
    .auth-form input {
        padding: 0.75rem 0.9rem;
        font-size: 0.85rem;
        border-radius: 12px;
    }
    
    .btn-primary {
        padding: 0.85rem 1rem;
        font-size: 0.85rem;
        border-radius: 12px;
    }
    
    .google-btn {
        padding: 0.8rem 0.9rem;
        font-size: 0.85rem;
        border-radius: 12px;
        gap: 0.5rem;
    }
    
    .google-icon {
        width: 20px;
        height: 20px;
    }
    
    .auth-switch {
        font-size: 0.85rem;
        margin-top: 1.2rem;
    }
    
    .alert {
        padding: 0.8rem 0.9rem;
        font-size: 0.85rem;
    }
}

/* Page d'administration */
.admin-section {
    padding: 2rem;
    padding-top: 6rem;
    min-height: 100vh;
    background: #f5f6fa;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
}

.admin-container h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.admin-container > p {
    color: #7f8c8d;
    margin-bottom: 2rem;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.admin-stat-card {
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.admin-stat-card:hover {
    transform: translateY(-5px);
}

.admin-stat-card h3 {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
}

.stat-number {
    font-size: 2.5rem;
    margin: 0.5rem 0 0 0;
    font-weight: 700;
}

.stat-moderators {
    background-color: #7fb41b;
}

.stat-users {
    background-color: #667eea;
}

.stat-admins {
    background-color: #f5576c;
}

.admin-container h2 {
    color: #2c3e50;
    margin: 2rem 0 1rem 0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.admin-table thead tr {
    background: #34495e;
}

.admin-table th {
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    color: white;
    font-weight: 600;
}

.admin-table tbody tr {
    border-bottom: 1px solid #ecf0f1;
    transition: background 0.2s ease;
}

.admin-table tbody tr:hover {
    background: #f8f9fa;
}

.admin-table tbody tr:last-child {
    border-bottom: none;
}

.admin-table td {
    padding: 0.75rem;
    color: #2c3e50;
}

.role-badge {
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.role-admin {
    background: #e74c3c;
}

.role-user {
    background: #95a5a6;
}

.role-selector {
    padding: 0.5rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    color: #2c3e50;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.role-selector:hover {
    border-color: #667eea;
}

.role-selector:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.role-selector:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.admin-actions {
    margin-top: 2rem;
}

.admin-actions h2 {
    color: #2c3e50;
}

.admin-actions p {
    color: #7f8c8d;
}

.search-bar {
    margin: 1.5rem 0;
}

.search-bar input {
    width: 100%;
    max-width: 500px;
    padding: 0.75rem 1.25rem;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-bar input::placeholder {
    color: #95a5a6;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 1rem;
}

.pagination-btn {
    padding: 0.75rem 1.5rem;
    background: #667eea;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-btn:hover:not(:disabled) {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.pagination-info {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1rem;
}

/* OAuth block */
.oauth-block {
    margin-top: 1.2rem;
}


.btn-delete {
    font-family: poppins;
    border: none;
    border-radius: 10px;
    height: 50px;
    width: 100Px;
    background-color: #e74c3c;
    color: white;
}

.btn-modify {
    font-family: poppins;
    border: none;
    border-radius: 10px;
    height: 50px;
    width: 100Px;
    background-color: #3c72e7;
    color: white;
}

.btn-modify:hover, .btn-delete:hover {
    transform: translateY(-2px);
    transition: 0.3s;
    cursor: pointer;
}

.btn-delete:active, .btn-modify:active {
    transform: translateY(0px);
    transition: 0.1s;
}

/* Règlement Carousel */
.reglement-carousel {
    padding: 80px 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
}

.carousel-container {
    width: 100%;
    max-width: 1000px;
    max-height: 700px;
    height: 80vh;
    transform-style: preserve-3d;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.carousel-cards {
    position: relative;
    width: 100%;
    height: 100%;
    margin-bottom: 20px;
}

.carousel-input {
    display: none;
}

.rule-card {
    position: absolute;
    width: 60%;
    height: 100%;
    left: 0;
    right: 0;
    margin: auto;
    transition: transform 0.4s ease, opacity 0.4s ease;
    cursor: pointer;
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
}

.rule-card h2 {
    color: #667eea;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 3px solid #667eea;
    padding-bottom: 15px;
}

.rule-item {
    margin: 15px 0;
    border-left: 3px solid #667eea;
    padding-left: 15px;
    transition: all 0.3s ease;
    position: relative;
}

.rule-item:hover {
    border-left-color: #764ba2;
}

.rule-title {
    color: #333;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
    user-select: none;
}

.rule-title:hover {
    background: #e9ecef;
}

.rule-title .arrow {
    font-size: 0.8rem;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: #667eea;
    will-change: transform;
}

.rule-item.active .rule-title .arrow {
    transform: rotate(90deg);
}

.rule-description {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    color: #666;
    line-height: 1.7;
    font-size: 0.95rem;
    padding: 0 10px;
    opacity: 0;
    will-change: max-height, padding, opacity;
}

.rule-item.active .rule-description {
    max-height: 1000px;
    padding: 15px 10px;
    opacity: 1;
}

.rule-card strong {
    color: #764ba2;
}

.info-badge {
    display: inline-block;
    background: #17a2b8;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-right: 8px;
    font-weight: 500;
}

/* Carousel animations */
/* Cartes à gauche (visibles) */
#card-1:checked ~ .carousel-cards #label-4,
#card-2:checked ~ .carousel-cards #label-1,
#card-3:checked ~ .carousel-cards #label-2,
#card-4:checked ~ .carousel-cards #label-3 {
    transform: translateX(-40%) scale(0.8);
    opacity: 0.4;
    z-index: 0;
}

/* Cartes à droite (visibles) */
#card-1:checked ~ .carousel-cards #label-2,
#card-2:checked ~ .carousel-cards #label-3,
#card-3:checked ~ .carousel-cards #label-4,
#card-4:checked ~ .carousel-cards #label-1 {
    transform: translateX(40%) scale(0.8);
    opacity: 0.4;
    z-index: 0;
}

/* Carte centrale (visible) */
#card-1:checked ~ .carousel-cards #label-1,
#card-2:checked ~ .carousel-cards #label-2,
#card-3:checked ~ .carousel-cards #label-3,
#card-4:checked ~ .carousel-cards #label-4 {
    transform: translateX(0) scale(1);
    opacity: 1;
    z-index: 1;
}

/* Carte opposée (invisible) */
#card-1:checked ~ .carousel-cards #label-3,
#card-2:checked ~ .carousel-cards #label-4,
#card-3:checked ~ .carousel-cards #label-1,
#card-4:checked ~ .carousel-cards #label-2 {
    transform: translateX(0) scale(0.5);
    opacity: 0;
    z-index: -1;
    pointer-events: none;
}

.carousel-indicators {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

#card-1:checked ~ .carousel-indicators label[for="card-1"],
#card-2:checked ~ .carousel-indicators label[for="card-2"],
#card-3:checked ~ .carousel-indicators label[for="card-3"],
#card-4:checked ~ .carousel-indicators label[for="card-4"] {
    background: #667eea;
    width: 30px;
    border-radius: 6px;
}

.rule-card::-webkit-scrollbar {
    width: 8px;
}

.rule-card::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.rule-card::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.rule-card::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* Bouton d'édition admin */
.admin-edit-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
}

.admin-edit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* Modal d'édition */
.edit-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(0px);
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.edit-modal.active {
    display: flex;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.edit-modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 35px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3), 0 0 0 1px rgba(102, 126, 234, 0.1);
    transform: scale(0.9) translateY(-20px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.edit-modal.active .edit-modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.edit-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 3px solid;
    border-image: linear-gradient(90deg, #667eea 0%, #764ba2 100%) 1;
    padding-bottom: 20px;
}

.edit-modal-header h2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.modal-body {
    padding: 20px 0;
}

.modal-body label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.rules-editor-container {
    margin-top: 20px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #333;
}

.rule-editor {
    margin: 20px 0;
    padding: 25px;
    border: 2px solid transparent;
    border-radius: 15px;
    background: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.rule-editor::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.rule-editor:hover {
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.rule-editor:hover::before {
    transform: scaleX(1);
}

.rule-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.rule-editor label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.rule-editor input[type="text"],
.rule-editor textarea {
    width: 100%;
    padding: 12px 15px;
    margin: 10px 0;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.rule-editor input[type="text"]:focus,
.rule-editor textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.rule-editor textarea {
    min-height: 100px;
    resize: vertical;
}

.text-editor-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    padding: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e9ecef;
    border-radius: 10px;
    flex-wrap: wrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.text-editor-toolbar button {
    background: white;
    border: 2px solid #e9ecef;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-editor-toolbar button:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.text-editor-toolbar button.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.rule-desc-input {
    min-height: 120px;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.rule-desc-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.rule-desc-input[contenteditable]:empty:before {
    content: attr(data-placeholder);
    color: #999;
    font-style: italic;
}

.text-editor-toolbar input[type="color"] {
    width: 40px;
    height: 30px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.btn-save-rule,
.btn-add-rule,
.btn-delete-rule {
    padding: 12px 28px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 5px;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-save-rule::before,
.btn-add-rule::before,
.btn-delete-rule::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-save-rule:hover::before,
.btn-add-rule:hover::before,
.btn-delete-rule:hover::before {
    width: 300px;
    height: 300px;
}

.btn-save-rule {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.btn-save-rule:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.btn-add-rule {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1rem;
}

.btn-add-rule:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-delete-rule {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.btn-delete-rule:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
}

.modal-body label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-size: 1rem;
    letter-spacing: 0.3px;
}

.card-selector {
    margin-bottom: 25px;
}

#cardSelect {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

#cardSelect:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

#cardSelect:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}