/* ====== VARIABLES ====== */
:root {
    --primary-color: #00AD50;
    --primary-dark: #008a40;
    --primary-light: #4cd488;
    --secondary-color: #0033A0;
    --secondary-dark: #002680;
    --secondary-light: #335db3;
    --light-bg: #f8f9fa;
    --dark-bg: #212529;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-light: #f8f9fa;
    --border-color: #e0e0e0;
    --success: #28a745;
    --info: #17a2b8;
    --warning: #ffc107;
    --danger: #dc3545;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition-fast: 0.2s;
    --transition-normal: 0.3s;
    --transition-slow: 0.5s;
    --font-main: 'Inter', sans-serif;
}

/* ====== RESET & BASE STYLES ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-primary);
    background-color: var(--light-bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--secondary-light);
}

img {
    max-width: 100%;
    height: auto;
}

/* ====== HEADER ====== */
.header {
    background-color: white;
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: opacity var(--transition-fast);
}

.header-left:hover {
    color: inherit;
    text-decoration: none;
    opacity: 0.8;
}

.header-right {
    display: flex;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    height: 60px;
    width: auto;
}

.header h1 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.header h1 span {
    color: var(--primary-color);
}

/* Modification Request Button */
.modification-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.modification-btn:hover {
    background-color: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.modification-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.modification-btn i {
    font-size: 0.9rem;
}

.btn-text-short {
    display: none;
}

/* ====== MAIN CONTENT ====== */
.main {
    flex: 1;
    padding: 2rem 0;
}

/* Search and Filter */
.search-container {
    margin-bottom: 2rem;
}

.search-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: center;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    min-width: fit-content;
}

.filter-btn:hover {
    background-color: var(--light-bg);
    border-color: var(--primary-light);
    transform: translateY(-1px);
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 500;
}

/* Sites Grid */
.sites-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.site-card {
    background-color: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.site-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.site-image {
    width: 100%;
    height: 150px;
    object-fit: contain;
    padding: 1rem;
    background-color: white;
    transition: transform var(--transition-fast);
}

.site-image-link {
    display: block;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    background-color: white;
}

.site-image-link:hover .site-image {
    transform: scale(1.05);
}

.site-content {
    padding: 1.5rem;
}

.site-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.site-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.site-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
}

.site-link:hover {
    color: var(--primary-dark);
}

/* ====== STYLES POUR LIENS MULTIPLES ====== */
.site-links-multiple {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 0.8rem;
}

.site-links-multiple .site-link {
    margin-top: 0;
    display: block;
    text-align: left;
}

.site-category {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: var(--secondary-light);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

/* ====== FOOTER ====== */
.footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 2rem 0;
    margin-top: auto;
    box-shadow: none;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
}

.footer-info {
    max-width: 600px;
}

.footer a {
    color: var(--text-light);
}

.footer a:hover {
    text-decoration: underline;
}

/* Exception pour les liens sociaux */
.footer .social-link:hover {
    text-decoration: none;
}

.copyright {
    margin-bottom: 1.5rem;
}

.support-info h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--primary-light);
}

.support-info p {
    margin-bottom: 0.5rem;
}

.support-info i {
    margin-right: 0.5rem;
}

.footer-logo {
    height: 60px;
    margin-bottom: 1rem;
}

/* Row and Column Layout */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-lg-4 {
    flex: 0 0 calc(33.333% - 30px);
    width: calc(33.333% - 30px);
    padding: 0 15px;
    margin-bottom: 1.5rem;
}

/* Footer Specific Styles */
.footer-brand {
    margin-bottom: 1rem;
}

.footer h5 {
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer h5::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 40px;
    background-color: var(--primary-color);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--transition-fast) ease;
}

.social-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    text-decoration: none;
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

/* ====== ANIMATIONS ====== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.site-card {
    animation: fadeIn 0.5s ease-in-out;
}

/* ====== RESPONSIVE DESIGN ====== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .header-left {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .logo {
        height: 50px;
    }
    
    .modification-btn {
        font-size: 0.85rem;
        padding: 0.6rem 1.2rem;
    }
    
    .filter-container {
        justify-content: flex-start;
    }
    
    .filter-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .sites-container {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
      .col-lg-4 {
        flex: 0 0 100%;
        width: 100%;
    }
      .footer .row {
        flex-direction: column;
        text-align: left;
    }
    
    .social-links {
        justify-content: flex-start;
    }
    
    .footer-bottom {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.2rem;
    }
    
    .logo {
        height: 40px;
    }
    
    .modification-btn {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }
    
    .btn-text-full {
        display: none;
    }
    
    .btn-text-short {
        display: inline;
    }
    
    .filter-btn {
        font-size: 0.75rem;
        padding: 0.35rem 0.6rem;
    }
    
    .sites-container {
        grid-template-columns: 1fr;
    }
    
    .filter-container {
        justify-content: center;
        gap: 0.3rem;
    }
}