/* Variables de couleurs - Palette institutionnelle basée sur le logo SES */
:root {
    --primary-blue: #4A9FD9;        
    --primary-green: #5CB85C;       
    --accent-orange: #F0AD4E;       
    --dark-blue: #1F3A5F;          
    --navy: #2C3E50;               
    --light-blue: #EBF4F9;         
    --success-green: #449D44;      
    --light-green: #F0F9F0;        
    --warm-orange: #D58512;        
    --light-orange: #FDF6E3;       
    --text-dark: #2C3E50;          
    --text-light: #6C757D;         
    --white: #FFFFFF;
    --light-gray: #F8F9FA;
    --border-gray: #E9ECEF;
}

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

body {
    font-family: 'BrandonGrotesque', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    overflow-x: hidden;
}

p {
    font-size: 16px;
    line-height: 1.6;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header et Navigation MOBILE */
header {
    background: var(--navy);
    color: var(--white);
    padding: 0.8rem 0;
    position: static;
    width: 100%;
    box-shadow: none;
}

nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
    min-height: auto;
}

.logo {
    flex-shrink: 0;
}

.logo-img {
    height: 80px;
    width: auto;
    display: block;
}

.nav-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.nav-right h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--white);
    text-align: center;
    line-height: 1.2;
}

.nav-menu {
    display: none;
    visibility: hidden;
}

/* Sections générales MOBILE */
#apropos {
    margin-top: 20px;
    padding-top: 40px;
}

.section {
    padding: 40px 0;
}

.bg-light {
    background: var(--light-blue);
}

.bg-dark {
    background: var(--dark-blue);
    color: var(--white);
}

.section h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--navy);
    position: relative;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-green));
    border-radius: 2px;
}

.bg-dark h2 {
    color: var(--white);
}

.bg-dark h2::after {
    background: linear-gradient(90deg, var(--accent-orange), var(--primary-blue));
}

/* Section À propos MOBILE */
#apropos .content {
    max-width: 100%;
    margin: 0 auto;
    font-size: 16px;
}

#apropos h3 {
    color: var(--primary-green);
    margin: 1.5rem 0 1rem;
    font-size: 1.4rem;
}

#apropos ul {
    list-style: none;
    padding-left: 0;
}

#apropos li {
    padding: 0.4rem 0;
    position: relative;
    padding-left: 1.5rem;
    font-size: 15px;
}

#apropos li:before {
    content: "✓";
    color: var(--success-green);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.fdf-link-simple {
    margin-top: 1.5rem;
    text-align: center;
}

.btn-fdf-simple {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--primary-blue);
    border-radius: 8px;
    display: inline-block;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-fdf-simple:hover {
    background: var(--primary-blue);
    color: var(--white);
}

/* Container mobile pour les actions */
.actions-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

/* Section actions MOBILE - 3 colonnes FORCÉES */
.actions-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 0.5rem !important;
    margin: 1.5rem 0 2rem !important;
    width: 100% !important;
}

.projects-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 0.5rem !important;
    width: 100% !important;
}

/* Scroll horizontal pour toutes les sections MOBILE */
.projects-scroll-container {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 0.5rem 0;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
}

.projects-grid.projects-scroll-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    grid-template-columns: none !important;
    gap: 0.8rem !important;
    min-width: max-content !important;
    padding-bottom: 0.5rem !important;
    width: auto !important;
    overflow: visible !important;
}

.projects-scroll-grid .project-card {
    flex: 0 0 195px !important;
    min-height: 200px !important;
    display: inline-block !important;
    white-space: normal !important;
    vertical-align: top !important;
}

/* Projets en cours - couleur verte MOBILE */
#projets-actuels .projects-scroll-grid .project-card {
    border-left-color: var(--primary-green) !important;
}

#projets-actuels .projects-scroll-grid .project-card:hover {
    border-left-color: var(--success-green) !important;
}

#projets-actuels .projects-scroll-grid .project-status {
    background: var(--success-green) !important;
}

/* Projets financés - couleur orange MOBILE */
#projets-passes .projects-scroll-grid .project-card {
    border-left-color: var(--accent-orange) !important;
}

#projets-passes .projects-scroll-grid .project-card:hover {
    border-left-color: var(--warm-orange) !important;
}

#projets-passes .projects-scroll-grid .project-status {
    background: var(--accent-orange) !important;
}

/* Section partenaires MOBILE */
.partners-section {
    margin-top: 2rem;
    text-align: center;
}

.partners-section h3 {
    color: var(--navy);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

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

.partner-logo {
    height: 40px;
    width: auto;
    max-width: 80px;
    object-fit: contain;
    filter: grayscale(70%);
    transition: all 0.3s ease;
    opacity: 0.8;
}

.partner-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.action-card {
    background: var(--white) !important;
    padding: 0.7rem !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.1) !important;
    border-top: 2px solid var(--primary-green) !important;
    transition: all 0.3s ease !important;
    min-height: 120px !important;
    display: flex !important;
    flex-direction: column !important;
}

.action-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.15) !important;
}

.action-card:nth-child(2) {
    border-top-color: var(--accent-orange) !important;
}

.action-card:nth-child(3) {
    border-top-color: var(--primary-blue) !important;
}

.action-card h4 {
    color: var(--navy) !important;
    margin-bottom: 0.5rem !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

.action-card p {
    font-size: 0.65rem !important;
    line-height: 1.3 !important;
    flex: 1 !important;
}

/* Projets actuels MOBILE - 3 colonnes FORCÉES */
.project-card {
    background: var(--white) !important;
    padding: 0.7rem !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.1) !important;
    transition: all 0.3s ease !important;
    border-left: 2px solid var(--primary-green) !important;
    cursor: pointer !important;
    min-height: 140px !important;
    display: flex !important;
    flex-direction: column !important;
}

.project-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.15) !important;
    border-left-color: var(--accent-orange) !important;
}

.project-card h3 {
    color: var(--navy) !important;
    margin-bottom: 0.5rem !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

.project-card p {
    font-size: 0.65rem !important;
    line-height: 1.3 !important;
    flex: 1 !important;
}

.project-status {
    display: inline-block;
    background: var(--success-green);
    color: var(--white);
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    font-size: 0.7rem;
    margin-top: 0.8rem;
    font-weight: 500;
}


/* Section Contact MOBILE */
.contact-simple {
    text-align: center;
    max-width: 100%;
    margin: 0 auto;
}

.contact-simple p {
    color: var(--white);
    font-size: 16px;
    margin-bottom: 1.5rem;
}

.contact-email {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.contact-email a {
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.contact-email a:hover {
    color: var(--accent-orange);
    transform: translateY(-1px);
}

/* Footer MOBILE */
footer {
    background: var(--navy);
    color: var(--white);
    text-align: center;
    padding: 1.5rem 0;
    border-top: 2px solid var(--primary-blue);
    font-size: 14px;
}

/* Navigation smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Focus states for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Modale MOBILE */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 62, 80, 0.9);
    backdrop-filter: blur(3px);
}

.modal-content {
    background-color: var(--white);
    margin: 10% auto;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(44, 62, 80, 0.3);
    width: 95%;
    max-width: none;
    max-height: 75vh;
    overflow-y: auto;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: var(--text-light);
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: var(--navy);
}

#modalBody {
    padding: 1.5rem;
}

.modal h2 {
    color: var(--navy);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    border-bottom: 2px solid var(--primary-blue);
    padding-bottom: 8px;
}

.modal h3 {
    color: var(--primary-green);
    margin: 1.2rem 0 0.8rem;
    font-size: 1.1rem;
}

.modal p {
    line-height: 1.6;
    margin-bottom: 0.8rem;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.modal ul {
    margin: 0.8rem 0;
    padding-left: 1.5rem;
}

.modal li {
    margin-bottom: 0.4rem;
    color: var(--text-dark);
    font-size: 0.85rem;
}

.project-year {
    display: inline-block;
    background: var(--accent-orange);
    color: var(--white);
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}