/* Base Styles */
:root {
    --primary-color: #20c000;
    --secondary-color: #ff9e6d;
    --accent-color: #e04242;
    --background-color: #f8f9fa;
    --text-color: #333;
    --light-text: #6c757d;
    --border-color: #dee2e6;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

h1, h2, h3, h4 {
    font-family: 'Poppins', 'Outfit', sans-serif;
    margin-bottom: 1rem;
    line-height: 1.2;
    font-weight: 600;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

section {
    padding: 4rem 0;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-speed);
    font-weight: 500;
    text-align: center;
}

.btn:hover {
    background-color: #3a5a8c;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-secondary {
    background-color: var(--secondary-color);
}

.btn-accent {
    background-color: var(--accent-color);
}

/* Header Styles */
header {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

header h1 {
    font-size: 1.5rem;
    margin-bottom: 0;
}

nav ul {
    display: flex;
}

nav li {
    margin-left: 1.5rem;
}

nav a {
    font-weight: 500;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-speed);
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    position: relative;
    color: white;
    text-align: center;
    padding: 6rem 0;
    overflow: hidden;
    cursor: pointer; /* Shows a pointer cursor when hovering */
}

.hero-video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-video-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-video-background video {
    width: 100vw;
    height: 56.25vw; /* 16:9 aspect ratio */
    min-height: 100%;
    min-width: 177.77vh; /* 16:9 aspect ratio */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover; /* Ensures the video covers the container */
    cursor: pointer; /* Shows a pointer cursor when hovering */
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 2rem;
}

/* Destinations Section */
.destinations {
    background-color: white;
}

.destination-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 2rem;
}

.destination-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-speed);
    background-color: white;
}

.destination-card:hover {
    transform: translateY(-5px);
}

.destination-image {
    height: 200px;
    overflow: hidden;
}

.destination-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.destination-card:hover .destination-image img {
    transform: scale(1.05);
}

.destination-content {
    padding: 1.5rem;
}

.destination-content h3 {
    margin-bottom: 0.5rem;
}

.destination-content ul {
    margin-bottom: 1.5rem;
}

.destination-content li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.destination-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Voting Info Section */
.voting-info {
    background-color: #f1f5f9;
    text-align: center;
}

.steps {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.step {
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

/* Destination Detail Pages */
.destination-detail {
    padding: 2rem 0;
}

.destination-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 3rem;
}

.destination-header img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.program {
    margin-bottom: 3rem;
}

.program-item {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--card-shadow);
}

.program-item {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--card-shadow);
}

.program-item-left,
.program-item-right {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.program-content {
    flex: 1;
}

.program-image {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.program-image img {
    max-width: 100%;
    border-radius: 8px;
}

.program-map {
    width: 100%;
    border: 1px solid #ddd;
    overflow: hidden;
}

.program-item-right {
    flex-direction: row-reverse;
}

@media (max-width: 768px) {
    .program-item-left,
    .program-item-right {
        flex-direction: column;
    }
    
    .program-image {
        width: 100%;
        margin-top: 1.5rem;
    }
}

/* Voting Page */
.voting-container {
    /*max-width: 800px;*/
    margin: 0 auto;
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

.voting-instructions {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.ranking-list {
    margin-bottom: 2rem;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    cursor: move;
    transition: background-color var(--transition-speed);
}

.ranking-item:hover {
    background-color: #e9ecef;
}

.ranking-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    margin-right: 1rem;
    font-weight: bold;
}

.ranking-image {
    width: 80px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 1rem;
}

.ranking-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-name {
    flex-grow: 1;
    font-weight: 500;
}

.dragging {
    opacity: 0.5;
}

/* Results Page */
.results-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

.results-header {
    text-align: center;
    margin-bottom: 2rem;
}

.result-item {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.result-position {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    margin-right: 1.5rem;
    font-weight: bold;
    font-size: 1.2rem;
}

.result-image {
    width: 100px;
    height: 75px;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 1.5rem;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-details {
    flex-grow: 1;
}

.result-name {
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.result-score {
    color: var(--light-text);
}

.result-bar {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.result-bar-fill {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 4px;
}

/* Practical Information Page */
.info-container {
    max-width: 800px;
    margin: 0 auto;
}

.info-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.info-tab {
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all var(--transition-speed);
}

.info-tab:hover {
    color: var(--primary-color);
}

.info-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.info-content {
    display: none;
}

.info-content.active {
    display: block;
}

.info-card {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--card-shadow);
    display: flex;
    gap: 1.5rem;
}

.info-card-content {
    flex: 1;
}

.info-card-image {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.info-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .info-card {
        flex-direction: column;
    }
    
    .info-card-image {
        width: 100%;
        height: 200px;
        margin-bottom: 1rem;
    }
}

/* Map Styles */
#map-paris {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

/* Thank You Page */
.thank-you-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

.thank-you-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.thank-you-container h2 {
    margin-bottom: 1rem;
}

.thank-you-container p {
    margin-bottom: 2rem;
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Footer */
footer {
    background-color: #343a40;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

/* Responsive Styles */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    
    nav {
        margin-top: 1rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav li {
        margin: 0.5rem;
    }
    
    .hero {
        padding: 4rem 0;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .steps {
        flex-direction: column;
        align-items: center;
    }
    
    .step {
        width: 100%;
    }
    
    .result-item {
        flex-direction: column;
        text-align: center;
    }
    
    .result-position, .result-image {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}
/* Theme Toggle Button */
.theme-toggle-button {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem; /* Adjust size as needed */
    cursor: pointer;
    padding: 0.5rem;
    margin-left: 1rem; /* Add some space from the nav */
    transition: color var(--transition-speed), transform var(--transition-speed);
    line-height: 1; /* Ensure icon aligns well */
    position: relative; /* Needed for potential future enhancements */
    top: 2px; /* Fine-tune vertical alignment if needed */
}

.theme-toggle-button:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Adjust header container to accommodate the button */
header .container {
    position: relative; /* To allow absolute positioning of the button if needed, though flex should work */
    /* display: flex; already set */
    /* justify-content: space-between; already set */
    /* align-items: center; already set */
}

/* Dark Mode Theme */
body.dark-mode {
    --background-color: #1a1a1a; /* Dark background */
    --text-color: #e0e0e0;       /* Light text */
    --light-text: #a0a0a0;      /* Lighter grey text */
    --border-color: #444;       /* Darker border */
    --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.4); /* More pronounced shadow on dark */

    /* Adjust component backgrounds */
    background-color: var(--background-color);
    color: var(--text-color);
}

body.dark-mode header {
    background-color: #2c2c2c; /* Darker header background */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

body.dark-mode header h1,
body.dark-mode nav a {
    color: var(--text-color); /* Ensure header text is light */
}

body.dark-mode nav a:hover,
body.dark-mode nav a.active {
    color: var(--secondary-color); /* Use secondary color for hover/active in dark mode */
}

body.dark-mode nav a::after {
     background-color: var(--secondary-color); /* Match hover/active color */
}

body.dark-mode .btn {
    /* Keep button text readable */
}

body.dark-mode .btn:hover {
     /* Adjust hover if needed */
}

body.dark-mode .destination-card,
body.dark-mode .step,
body.dark-mode .program-item,
body.dark-mode .voting-container,
body.dark-mode .results-container,
body.dark-mode .info-container section /* Target sections within info container */ {
    background-color: #2c2c2c; /* Dark background for cards/containers */
    box-shadow: var(--card-shadow);
}

body.dark-mode .destination-content h3,
body.dark-mode .step h3,
body.dark-mode .program-item h3,
body.dark-mode .result-name {
    color: var(--text-color); /* Ensure headings inside cards are light */
}

body.dark-mode .destination-content li::before {
    color: var(--secondary-color); /* Use secondary color for list bullets */
}

body.dark-mode .destinations, /* Add this */
body.dark-mode .voting-info {
    background-color: #252525; /* Slightly different dark background */
}

body.dark-mode .ranking-item,
body.dark-mode .result-item {
    background-color: #3a3a3a; /* Darker background for list items */
}

body.dark-mode .ranking-item:hover {
    background-color: #4f4f4f;
}

body.dark-mode .result-bar {
    background-color: #444;
}

body.dark-mode .info-card {
    background-color: rgb(110, 110, 110);
}

body.dark-mode .info-tabs {
    border-bottom-color: var(--border-color);
}

body.dark-mode .info-tab {
     color: var(--light-text);
}

body.dark-mode .info-tab:hover {
    color: var(--secondary-color);
}

body.dark-mode .info-tab.active {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

body.dark-mode .theme-toggle-button {
    color: var(--text-color); /* Ensure button icon is light */
}

body.dark-mode .theme-toggle-button:hover {
    color: var(--secondary-color);
}

/* Ensure footer text is readable */
body.dark-mode footer {
    background-color: #1a1a1a; /* Match body background or use a slightly different dark shade */
    color: var(--light-text);
}
/* Drag and Drop Enhancements */
.ranking-list {
    position: relative; /* Needed for absolute positioning of placeholder if used */
}

.ranking-item {
    /* Existing styles */
    transition: transform 0.2s ease-in-out, background-color var(--transition-speed), box-shadow 0.2s ease-in-out; /* Add transition for smooth movement */
    /* Ensure items don't shrink when dragging */
    flex-shrink: 0;
}

.ranking-item.dragging {
    opacity: 0.6; /* Slightly less transparent */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* Add a more prominent shadow */
    /* transform: scale(1.02); Optional: slightly enlarge */
    cursor: grabbing;
}

/* Placeholder style */
.ranking-item-placeholder {
    background-color: #e0e0e0;
    border: 2px dashed var(--primary-color);
    border-radius: 4px;
    height: 80px; /* Match the approximate height of ranking-item */
    margin-bottom: 1rem; /* Match ranking-item margin */
    opacity: 0.7;
    box-sizing: border-box; /* Include border in height */
    flex-shrink: 0;
}

body.dark-mode .ranking-item-placeholder {
    background-color: #444;
    border-color: var(--secondary-color);
}
/* Center the video player section */
.video-player .container {
    text-align: center; /* Center the heading */
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 800px; /* Limit max width */
    margin: 20px auto; /* Center the wrapper horizontally and add some vertical margin */
    background: #eee; /* Add a light background for visibility if video fails */
    display: flex; /* Use flexbox to center the iframe */
    justify-content: center;
    align-items: center;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Add a message if the video doesn't load */
.video-wrapper::before {
    content: 'Vidéo non disponible pour intégration directe.';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #555;
    font-size: 1em;
    display: none; /* Hide by default */
}

/* Show message only if iframe fails (this is tricky, might not work reliably) */
/* A better approach might be needed if the video truly fails often */
.video-wrapper iframe[src=""] + ::before, /* Example condition, might need adjustment */
.video-wrapper iframe:error + ::before { /* Hypothetical error state */
    display: block;
}

.gallery-item {
    width: 30vw; /* Responsive width */
    height: 30vw; /* Responsive height (makes them square) */
    max-width: 300px; /* Max width on larger screens */
    max-height: 300px; /* Max height on larger screens */
    border-radius: 8px;
    overflow: hidden; /* Hide parts of the image/video that are outside the container */
}

.gallery-item video {
    object-fit: cover;
    width: 100%;
    height: 100%; /* Ensure video covers the container */
}

.gallery-item img {
    object-fit: cover; /* Ensure image covers the container */
    width: 100%;
    height: 100%; /* Ensure image covers the container */
}

/* Overlay Styles */
.overlay-text {
    position: absolute; /* Positioned relative to .item-overlays */
    color: white;
    font-size: 2vw; /* Scaled with viewport width */
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    pointer-events: auto; /* Allow interaction with text overlays */
}

.overlay-emoji {
    position: absolute; /* Positioned relative to .item-overlays */
    font-size: 4vw; /* Scaled with viewport width */
    pointer-events: auto; /* Allow interaction with emoji overlays */
}

.overlay-arrow {
    position: absolute; /* Positioned relative to .item-overlays */
    color: white; /* Or an arrow image/SVG */
    font-size: 2em; /* Example size for arrow icon */
    pointer-events: auto; /* Allow interaction with arrow overlays */
}
/* Specific styles for the photos page background */
body.photos-page {
    background-image: url('../images/Anniversaire Guegan.jpg');
    background-size: contain; /* Ensure the entire image is visible */
    background-repeat: no-repeat;
    /* Removed background-attachment: fixed; to allow scrolling */
}