:root {
    --color-orange: #FF8200; /* Ivory Coast Orange */
    --color-white: #FFFFFF;
    --color-green: #009A44; /* Ivory Coast Green */
    --color-dark: #333333;
    --color-light: #f4f4f4;
    --font-main: 'Poppins', sans-serif;
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--color-dark);
    background-color: var(--color-light);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* --- Header --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--color-orange), var(--color-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav ul {
    display: flex;
    gap: 2rem;
}

nav a {
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background: linear-gradient(to right, var(--color-orange), var(--color-white), var(--color-green));
    transition: var(--transition);
}

nav a:hover::after {
    width: 100%;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 100vh;
    /* Removed static background image in favor of video */
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
    padding: 0 20px;
    overflow: hidden;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.video-background iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw; /* 16:9 Aspect Ratio */
    min-height: 100vh;
    min-width: 177.77vh; /* 16:9 Aspect Ratio */
    transform: translate(-50%, -50%);
    pointer-events: none; /* Default: prevent interaction, let background play */
    transition: all 0.5s ease;
}

/* When "Voir la Vidéo" is clicked */
.video-background.active-view {
    z-index: 10; /* Bring to front */
}
.video-background.active-view iframe {
    pointer-events: auto; /* Enable controls */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Dark overlay */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2; /* Content above video and overlay */
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: fadeInUp 1s ease-out;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1.5s ease-out;
}

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

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--color-orange);
    color: var(--color-white);
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
}

.btn:hover {
    background: transparent;
    border-color: var(--color-orange);
    color: var(--color-white);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-white);
    color: var(--color-white);
}

.btn-outline:hover {
    background: var(--color-white);
    color: var(--color-dark);
}

/* --- Section Styling --- */
section {
    padding: 5rem 10%;
}

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

.section-title h3 {
    font-size: 2.5rem;
    color: var(--color-dark);
    margin-bottom: 10px;
}

.section-title .line {
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, var(--color-orange), var(--color-white), var(--color-green));
    margin: 0 auto;
}

/* --- Flip Cards --- */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.flip-card {
    background-color: transparent;
    height: 400px;
    perspective: 1000px; /* Essential for 3D effect */
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 15px;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Text at bottom for front */
}

.flip-card-front {
    background-color: var(--color-white);
    background-size: cover;
    background-position: center;
}

.flip-card-front::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

.flip-card-front h4 {
    color: white;
    font-size: 1.5rem;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.flip-card-back {
    background: linear-gradient(135deg, var(--color-orange), var(--color-green));
    color: white;
    transform: rotateY(180deg);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.flip-card-back h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.flip-card-back p {
    font-size: 1rem;
}

/* --- Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--color-white);
    width: 90%;
    max-width: 600px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: var(--color-white);
    cursor: pointer;
    z-index: 10;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    transition: transform 0.2s;
}

.close-modal:hover {
    transform: scale(1.1);
}

.modal-header {
    position: relative;
    height: 250px;
}

.modal-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-header h3 {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: var(--color-white);
    font-size: 1.8rem;
    margin: 0;
}

.modal-body {
    padding: 30px;
    text-align: center;
}

.modal-body p {
    margin-bottom: 25px;
    font-size: 1.05rem;
    color: #555;
    line-height: 1.8;
}

.modal-body .btn {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* --- Footer --- */
footer {
    background: var(--color-dark);
    color: var(--color-white);
    padding: 3rem 5%;
    text-align: center;
    border-top: 5px solid var(--color-orange);
}

.footer-content h4 {
    margin-bottom: 1rem;
}

.social-links {
    margin: 1.5rem 0;
}

.social-links a {
    color: var(--color-white);
    margin: 0 10px;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--color-orange);
}

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

/* --- Responsive --- */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 1rem;
    }
    
    nav ul {
        margin-top: 1rem;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
}