/* Variables globales */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-color: #1f2937;
    --light-text: #6b7280;
    --background-color: #ffffff;
    --light-background: #f3f4f6;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --error-color: #ef4444;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.5;
    background-color: var(--background-color);
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--background-color);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

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

.logo a {
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

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

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.search-bar {
    position: relative;
    width: 300px;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
}

.search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-text);
}

.login-button button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.login-button button:hover {
    background-color: var(--secondary-color);
}

/* Section héros */
.hero-section {
    padding: 8rem 2rem 4rem;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/heroun.jpeg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-search {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-search input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.search-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}

.search-btn:hover {
    background-color: var(--secondary-color);
}

.popular-searches {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.popular-searches span {
    opacity: 0.8;
}

.popular-searches a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    transition: background-color 0.2s;
}

.popular-searches a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Section Catégories */
.categories-section {
    padding: 4rem 2rem;
    background-color: var(--light-background);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--light-text);
    font-size: 1.125rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.category-card {
    position: relative;
    height: 300px;
    border-radius: var(--border-radius);
    overflow: hidden;
    text-decoration: none;
    color: white;
}

.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.7));
}

.category-content {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
}

.category-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.category-content p {
    opacity: 0.8;
}

/* Section Collections */
.featured-section {
    padding: 4rem 2rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.featured-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.featured-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.featured-content {
    padding: 1.5rem;
}

.featured-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.featured-content p {
    color: var(--light-text);
    margin-bottom: 1rem;
}

.image-count {
    color: var(--primary-color);
    font-weight: 500;
}

/* Section CTA */
.cta-section {
    padding: 4rem 2rem;
    background-color: var(--light-background);
}

.cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    color: var(--light-text);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.cta-button {
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s;
}

.cta-button.primary {
    background-color: var(--primary-color);
    color: white;
}

.cta-button.primary:hover {
    background-color: var(--secondary-color);
}

.cta-button.secondary {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.cta-button.secondary:hover {
    background-color: var(--light-background);
}

/* Footer */
.site-footer {
    background-color: var(--text-color);
    color: white;
    padding: 4rem 2rem 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.footer-section p {
    opacity: 0.8;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.footer-section ul a:hover {
    opacity: 1;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.social-links a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    opacity: 0.6;
}

/* Formulaires d'authentification */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: var(--light-background);
}

.auth-box {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 100%;
    max-width: 500px;
}

.auth-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.auth-tab {
    flex: 1;
    padding: 1rem;
    border: none;
    background: none;
    font-weight: 500;
    color: var(--light-text);
    cursor: pointer;
    border-bottom: 2px solid var(--border-color);
    transition: all 0.2s;
}

.auth-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.auth-form {
    display: block;
}

.auth-form.hidden {
    display: none;
}

.auth-form h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--light-text);
    margin-bottom: 2rem;
}

.custom-input {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    width: 100%;
    margin-bottom: 1rem;
}

.btn-auth-submit {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: background-color 0.2s;
}

.btn-auth-submit:hover {
    background-color: var(--secondary-color);
}

.auth-links {
    text-align: center;
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        padding: 1rem;
    }

    .nav-links {
        margin: 1rem 0;
    }

    .nav-actions {
        width: 100%;
        flex-direction: column;
        gap: 1rem;
    }

    .search-bar {
        width: 100%;
    }

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

    .hero-search {
        flex-direction: column;
    }

    .categories-grid,
    .featured-grid {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content,
.category-card,
.featured-card {
    animation: fadeIn 0.6s ease-out;
}

/* Messages d'erreur et de succès */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.alert-danger {
    background-color: #fee2e2;
    color: var(--error-color);
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #d1fae5;
    color: var(--success-color);
    border: 1px solid #a7f3d0;
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-menu span {
    font-weight: 500;
}

.logout-btn {
    color: var(--error-color);
    text-decoration: none;
    font-weight: 500;
}

.logout-btn:hover {
    text-decoration: underline;
}

/* Ajout des styles spécifiques pour la page d'authentification */
.auth-page {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    min-height: 100vh;
}

.auth-page nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.auth-container {
    padding-top: 100px;
    padding-bottom: 2rem;
}

.auth-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    max-width: 550px;
    width: 90%;
    margin: 0 auto;
    transition: transform 0.3s ease;
}

.auth-box:hover {
    transform: translateY(-5px);
}

.auth-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    font-weight: 600;
    color: var(--light-text);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.auth-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.auth-tab.active {
    color: var(--primary-color);
}

.auth-tab.active::after {
    transform: scaleX(1);
}

.auth-tab i {
    margin-right: 0.5rem;
}

.auth-form {
    animation: fadeIn 0.3s ease-out;
}

.auth-form.hidden {
    display: none;
}

.auth-form h2 {
    color: var(--text-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.auth-form h2 i {
    color: var(--primary-color);
}

.auth-subtitle {
    color: var(--light-text);
    margin-bottom: 2rem;
}

.form-floating > .form-control {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem 1rem 1rem 2.5rem;
    height: calc(3.5rem + 2px);
    transition: all 0.3s ease;
}

.form-floating > .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.1);
}

.form-floating > label {
    padding-left: 2.5rem;
    color: var(--light-text);
}

.form-floating > label i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-text);
    transition: all 0.3s ease;
}

.form-floating > .form-control:focus ~ label i {
    color: var(--primary-color);
}

.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    color: var(--light-text);
    padding: 0;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.btn-auth-submit {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.btn-auth-submit:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-auth-submit i {
    margin-right: 0.5rem;
}

.auth-links {
    text-align: center;
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-links a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.form-check-label {
    color: var(--text-color);
    cursor: pointer;
}

.form-check-input {
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.alert {
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: none;
}

.alert-danger {
    background-color: #fee2e2;
    color: #dc2626;
}

.alert-success {
    background-color: #dcfce7;
    color: #16a34a;
}

.alert p:last-child {
    margin-bottom: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design pour la page d'authentification */
@media (max-width: 576px) {
    .auth-box {
        padding: 1.5rem;
    }

    .auth-form h2 {
        font-size: 1.5rem;
    }

    .auth-tab {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .form-floating > .form-control {
        font-size: 0.9rem;
    }
}