/* Charte Graphique OPPCI */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --primary-orange: #f07e1b;
    --primary-green: #3ca832;
    --primary-blue: #004b9c;
    --primary-blue-dark: #003773;
    
    --bg-dark: #0f172a;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --text-light: #f1f5f9;
    
    --border-color: #e2e8f0;
    --border-focus: #f07e1b;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-premium: 0 20px 40px -15px rgba(0, 75, 156, 0.15);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--primary-blue);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

/* Layout Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header & Navigation */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo img {
    height: 65px;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-link {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-dark);
    padding: 8px 12px;
    border-radius: 6px;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-orange);
    background-color: rgba(240, 126, 27, 0.05);
}

.nav-btn {
    background-color: var(--primary-orange);
    color: white;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(240, 126, 27, 0.2);
}

.nav-btn:hover {
    background-color: #d86812;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(240, 126, 27, 0.3);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-blue);
    border-radius: 3px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    position: relative;
    height: calc(100vh - 95px);
    min-height: 550px;
    background: linear-gradient(135deg, rgba(0, 75, 156, 0.9), rgba(60, 168, 50, 0.7)), url('../images/hero-bg.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    color: white;
    text-align: center;
    overflow: hidden;
}

.hero-slideshow {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Vidéo d'arrière-plan */
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 1;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

/* Carrousel d'images */
.hero-slides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slides .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slides .slide.active {
    opacity: 1;
}

/* Superposition de couleur dégradée sombre pour la lisibilité */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 75, 156, 0.85), rgba(60, 168, 50, 0.7));
    z-index: 2;
    pointer-events: none;
}

.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-md);
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.hero-nav:hover {
    background: rgba(255, 255, 255, 0.26);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    z-index: 10; /* Toujours au-dessus des médias d'arrière-plan */
    position: relative;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: white;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 35px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.3);
    opacity: 0.95;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 15px;
}

@media (max-width: 768px) {
    .hero {
        min-height: 480px;
    }

    .hero-nav {
        width: 52px;
        height: 52px;
    }

    .hero-prev {
        left: 12px;
    }

    .hero-next {
        right: 12px;
    }
}

.btn {
    display: inline-block;
    padding: 8px 28px;
    font-weight: 600;
    border-radius: 30px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-orange);
    color: white;
    box-shadow: 0 4px 15px rgba(240, 126, 27, 0.4);
}

.btn-primary:hover {
    background-color: #d86812;
    transform: translateY(-3px);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: #d86812;
    color: var(--primary-blue);
    transform: translateY(-3px);
}

/* Sections */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-orange);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 50px auto;
}

/* Cards / Grid */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-premium);
    border-color: rgba(0, 75, 156, 0.2);
}

.gallery-masonry {
    column-count: 3;
    column-gap: 22px;
    margin-top: 30px;
}

.gallery-item {
    break-inside: avoid;
    margin: 0 0 22px;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    position: relative;
}

.gallery-item-1 img,
.gallery-item-4 img {
    aspect-ratio: 1 / 1.28;
}

.gallery-item-2 img,
.gallery-item-5 img {
    aspect-ratio: 1 / 0.9;
}

.gallery-item-3 img,
.gallery-item-6 img {
    aspect-ratio: 1 / 1.45;
}

.gallery-thumb {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.gallery-thumb img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.gallery-thumb:hover img {
    transform: scale(1.03);
}

.gallery-caption {
    padding: 14px 16px 16px;
}

.gallery-caption h4 {
    margin-top: 10px;
    font-size: 1rem;
    line-height: 1.3;
    color: #fff;
}
.gallery-caption { display: none !important; }

.gallery-badge {
    display: inline-block;
    font-size: 0.65rem;
    background-color: var(--primary-blue);
    color: white;
    padding: 3px 8px;
    border-radius: 999px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 4000;
}

.gallery-lightbox[hidden] {
    display: none;
}

.gallery-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.88);
}

.gallery-lightbox-dialog {
    position: relative;
    z-index: 1;
    width: min(92vw, 1100px);
    height: min(88vh, 900px);
    margin: 6vh auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox-figure {
    width: 100%;
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}

.gallery-lightbox-image {
    width: 100%;
    height: calc(100% - 84px);
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    background: rgba(255, 255, 255, 0.04);
}

.gallery-lightbox-caption {
    color: white;
    text-align: center;
}

.gallery-lightbox-title {
    color: white;
    margin-top: 10px;
    font-size: 1.2rem;
}

.gallery-lightbox-close,
.gallery-lightbox-nav {
    position: absolute;
    border: 0;
    cursor: pointer;
    z-index: 2;
}

.gallery-lightbox-close {
    top: -14px;
    right: -14px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: white;
    color: var(--primary-blue);
    font-size: 28px;
    line-height: 1;
    box-shadow: var(--shadow-lg);
}

.gallery-lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: white;
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox-prev {
    left: -72px;
}

.gallery-lightbox-next {
    right: -72px;
}

@media (max-width: 992px) {
    .gallery-masonry {
        column-count: 2;
    }

    .gallery-lightbox-dialog {
        width: 94vw;
    }

    .gallery-lightbox-prev {
        left: 8px;
    }

    .gallery-lightbox-next {
        right: 8px;
    }
}

/* iPad / large tablet adjustments (e.g. iPad Pro 12.9" portrait = 1024px) */
@media (max-width: 1200px) {
    /* Activate hamburger on larger tablets so nav doesn't overflow */
    .hamburger {
        display: flex;
    }

    .nav-menu {
        display: none;
    }

    .nav-menu.active {
        display: flex;
    }

    /* Make gallery use two columns on tablets */
    .gallery-masonry {
        column-count: 2;
        column-gap: 18px;
    }

    .gallery-item {
        margin-bottom: 18px;
    }
}

@media (max-width: 900px) {
    .gallery-masonry {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .gallery-masonry {
        column-count: 1;
    }
}

@media (max-width: 640px) {
    .gallery-masonry {
        column-count: 1;
    }

    .gallery-lightbox-image {
        height: calc(100% - 104px);
    }
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    margin-bottom: 20px;
}

.icon-orange { background-color: var(--primary-orange); }
.icon-green { background-color: var(--primary-green); }
.icon-blue { background-color: var(--primary-blue); }

/* Chiffres Clés */
.stats-section {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
    color: white;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: var(--primary-orange);
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Devenir Membre Box */
.cta-box {
    background: linear-gradient(135deg, rgba(60, 168, 50, 0.1), rgba(0, 75, 156, 0.1));
    border-radius: var(--border-radius);
    padding: 50px;
    text-align: center;
    border: 1px solid rgba(0, 75, 156, 0.15);
}

/* Footer */
footer {
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding: 70px 0 20px 0;
    font-size: 15px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--primary-orange);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a:hover {
    color: var(--primary-orange);
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    color: var(--text-muted);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(240, 126, 27, 0.15);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        padding: 20px;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--border-color);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .hero {
        height: 70vh;
    }
}
