/* ===== STYLE POUR LA PAGE MAROC 2025 ===== */

:root {
    --maroc-red: #C91E20;
    --maroc-green: #006233;
    --maroc-gold: #FFD700;
    --maroc-sand: #F4A460;
    --maroc-blue: #0A1628;
    --white: #FFFFFF;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-700: #374151;
    --gradient-maroc: linear-gradient(135deg, var(--maroc-red) 0%, var(--maroc-green) 100%);
}

/* Style général de la page */
.main-content {
    padding-top: 0;
}

/* ===== SECTION VIDÉO YOUTUBE ===== */
.video-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--white) 100%);
    position: relative;
    overflow: hidden;
}

.video-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%23C91E20" fill-opacity="0.03" points="0,1000 1000,0 1000,1000"/></svg>');
    z-index: 1;
}

.video-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.video-wrapper {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 3px solid transparent;
    background-clip: padding-box;
    background: #000;
}

.video-wrapper::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: var(--gradient-maroc);
    border-radius: 23px;
    z-index: -1;
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.video-aspect-ratio {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
    border-radius: 17px;
}

.video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 17px;
}

/* ===== SECTION PHOTOS (CARROUSEL) ===== */
.photos-section {
    padding: 0;
    background: var(--white);
    margin-top: 0;
    border-top: none;
}

.carousel-container {
    max-width: 1200px;
    margin: 2rem auto;
    overflow: visible;
    position: relative;
}

.carousel-wrapper {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.carousel-track {
    display: flex !important;
    height: 400px !important;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: auto !important;
    min-width: 0;
    box-sizing: border-box;
}

.carousel-item {
    flex: 0 0 350px !important;
    width: 350px !important;
    margin-right: 20px !important;
    min-width: 0;
    max-width: 100vw;
    box-sizing: border-box;
    border-radius: 15px;
    overflow: hidden;
    background-color: #f0f0f0; /* Placeholder color */
}

.carousel-item:hover {
    transform: scale(1.02) !important;
    border-color: var(--green) !important;
    box-shadow: 0 12px 35px rgba(201, 30, 32, 0.4) !important;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 1 !important; /* Force visibility */
    visibility: visible !important; /* Force visibility */
}

.carousel-item::after {
    display: none;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(17, 24, 39, 0.5); /* Fond plus sombre */
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 50px; /* Plus grand */
    height: 50px; /* Plus grand */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    font-size: 1.5rem; /* Icône plus grande */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.carousel-btn:hover {
    background: rgba(17, 24, 39, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 15px;
}

.carousel-next {
    right: 15px;
}

/* ===== EFFET TYPING ===== */
.typing-container {
    margin-top: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(201, 30, 32, 0.1));
    border-radius: 15px;
    border-left: 4px solid var(--gold);
}

.typing-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--dark-gray);
    font-style: italic;
    margin: 0;
    min-height: 50px;
}

.typing-text::after {
    content: '|';
    animation: blink 1s infinite;
    color: var(--red);
    font-weight: bold;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.photo-placeholder {
    background: var(--gray-100);
    border-radius: 15px;
    padding: 3rem;
    text-align: center;
    border: 2px dashed var(--maroc-gold);
    width: 100%;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.photo-placeholder i {
    font-size: 3rem;
    color: var(--maroc-gold);
    margin-bottom: 1rem;
}

.photo-placeholder p {
    color: var(--gray-700);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.photo-placeholder small {
    color: var(--gray-600);
    font-style: italic;
}

/* ===== SECTION DÉTAILS DU VOYAGE ===== */
.details-section {
    padding-top: 4rem;
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--gray-100) 0%, rgba(255, 215, 0, 0.05) 100%);
    overflow-x: hidden; /* Prévient les débordements */
}

.voyage-details {
    max-width: 1200px;
    margin: 0 auto;
}

.intro-box {
    background: var(--white);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 4rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
}

.intro-box h3 {
    font-size: 2.5rem;
    color: var(--maroc-blue);
    margin-bottom: 1.5rem;
    font-family: "Playfair Display", serif;
}

.intro-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--gray-700);
}

/* ===== TIMELINE SUBLIME ET TOUJOURS VISIBLE ===== */
.timeline {
    position: relative;
    max-width: 1100px;
    margin: 5rem auto 6rem auto;
    padding: 0 0 2rem 0;
    display: flow-root; /* Le clearfix moderne pour contenir les floats */
}
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 100%;
    background: linear-gradient(to bottom, #FFD700 0%, #C91E20 100%);
    box-shadow: 0 0 16px 2px #FFD70044;
    border-radius: 3px;
    z-index: 0;
}
.timeline-item {
    position: relative;
    width: 50%;
    padding: 2.5rem 2.5rem 2.5rem 0;
    box-sizing: border-box;
    margin-bottom: 3.5rem;
    z-index: 1;
    float: left;
    clear: both;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}
.timeline-item:nth-child(even) {
    float: right;
    padding: 2.5rem 0 2.5rem 2.5rem;
}
.timeline-marker {
    position: absolute;
    top: 2.5rem;
    right: -38px;
    left: auto;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #FFD700 60%, #C91E20 100%);
    border: 4px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 12px #FFD70055;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}
.timeline-item:nth-child(even) .timeline-marker {
    left: -38px;
    right: auto;
}
.timeline-content {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(201,30,32,0.10), 0 1.5px 8px #FFD70022;
    padding: 2.2rem 2rem 2rem 2rem;
    position: relative;
    border-top: 5px solid #FFD700;
    border-bottom: 2px solid #C91E20;
    min-height: 120px;
}
.timeline-content h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #C91E20;
    margin-top: 0;
    margin-bottom: 1rem;
}
.timeline-date {
    font-weight: bold;
    color: #C91E20;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
@media (max-width: 900px) {
    .timeline {
        padding: 0 0 2rem 0;
    }
    .timeline-item, .timeline-item:nth-child(even) {
        width: 100%;
        float: none;
        padding: 2.5rem 0 2.5rem 60px;
    }
    .timeline-marker, .timeline-item:nth-child(even) .timeline-marker {
        left: 10px;
        right: auto;
    }
}
@media (max-width: 600px) {
    .timeline {
        padding: 0 0 2rem 0;
    }
    .timeline-item, .timeline-item:nth-child(even) {
        padding: 2.5rem 0 2.5rem 30px;
    }
    .timeline-marker, .timeline-item:nth-child(even) .timeline-marker {
        left: -6px;
        width: 24px;
        height: 24px;
    }
    .timeline-content {
        padding: 1.2rem 1rem 1rem 1rem;
    }
    .timeline::before,
    .timeline::after {
        display: none !important;
    }
}

/* ===== TRAIT ROUGE SUR LA TIMELINE ===== */
.timeline::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: #C91E20;
    z-index: 1;
    pointer-events: none;
}

/* ===== BADGES DANS LA TIMELINE ===== */
.timeline-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.2rem;
}
.timeline-badge {
    display: inline-block;
    background: linear-gradient(90deg, #FFD700 60%, #C91E20 100%);
    color: #222;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.35em 1em;
    border-radius: 20px;
    box-shadow: 0 2px 8px #FFD70022;
    border: 1px solid #C91E20;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* ===== POINTS FORTS (TITRE AMÉLIORÉ) ===== */
.highlights-section .section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 3rem;
}
.highlights-section .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-maroc);
    border-radius: 2px;
}

.highlights-section {
    padding: 4rem 0;
    background-color: var(--gray-100);
    clear: both;
}

.highlights-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin: 0 auto;
    max-width: 1200px;
}

.highlight-card {
    flex: 1 1 250px; /* flex-grow, flex-shrink, flex-basis */
    max-width: 300px;
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.highlight-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.highlight-icon {
    font-size: 2.5rem;
    color: var(--red);
    margin-bottom: 1rem;
}

/* ===== SECTION SIYATA DICHMAYA ===== */
.siyata-section {
    margin: 5rem 0;
    padding: 3rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(201, 30, 32, 0.05));
    border-radius: 25px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.siyata-section::before {
    content: '✨';
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 3rem;
    opacity: 0.3;
    animation: sparkle 3s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.2); }
}

.siyata-content h3 {
    color: var(--maroc-blue);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    font-family: "Playfair Display", serif;
}

.siyata-content p {
    color: var(--gray-700);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.siyata-content blockquote {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    border-left: 5px solid var(--maroc-gold);
    margin: 0;
    font-style: italic;
    color: var(--gray-700);
    line-height: 1.7;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* ===== SECTION ALBUM PHOTOS (ARRIÈRE-PLAN MIS À JOUR) ===== */
.album-section {
    padding: 6rem 2rem;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/maroc25/20250316_110034.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed; /* Effet Parallaxe */
}

.album-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    max-width: 750px;
    margin: 0 auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    border-left: 1px solid rgba(255, 255, 255, 0.5);
}

.album-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    color: var(--maroc-blue);
    margin-bottom: 0.75rem;
}

.album-header p {
    font-size: 1.1rem;
    color: var(--gray-700);
    margin-bottom: 2.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.album-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--gradient-maroc);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 8px 25px rgba(201, 30, 32, 0.3);
}

.album-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 35px rgba(201, 30, 32, 0.4);
}

.album-button i {
    transition: transform 0.3s;
}

.album-button:hover i {
    transform: translateX(5px);
}

/* ===== SECTION RÉACTIONS DES PARENTS ===== */
.reactions-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--white) 100%);
}

.reactions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 3rem;
    margin-bottom: 5rem;
}

.reaction-category {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border-top: 5px solid var(--maroc-gold);
}

.reaction-category h3 {
    color: var(--maroc-blue);
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-family: "Playfair Display", serif;
    text-align: center;
}

.testimonials blockquote {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), rgba(201, 30, 32, 0.02));
    padding: 1.8rem;
    border-radius: 15px;
    margin: 0 0 1.5rem 0;
    border-left: 4px solid var(--maroc-gold);
    font-style: italic;
    color: var(--gray-700);
    line-height: 1.6;
    position: relative;
}

.testimonials blockquote::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 15px;
    font-size: 3rem;
    color: var(--maroc-gold);
    opacity: 0.5;
}

.testimonials blockquote:last-child {
    margin-bottom: 0;
}

/* ===== RÉACTIONS AMUSANTES ===== */
.fun-reactions {
    background: var(--white);
    padding: 3rem;
    border-radius: 20px;
    margin-bottom: 3rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.fun-reactions h3 {
    color: var(--maroc-blue);
    font-size: 2rem;
    margin-bottom: 2rem;
    font-family: "Playfair Display", serif;
}

.fun-quotes {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.fun-quote {
    background: linear-gradient(135deg, var(--maroc-red), var(--maroc-green));
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 8px 25px rgba(201, 30, 32, 0.3);
    transition: transform 0.3s ease;
}

.fun-quote:hover {
    transform: translateY(-5px);
}

/* ===== RÉPONSES DES RABBANIM ===== */
.rabbanim-responses {
    background: linear-gradient(135deg, rgba(10, 22, 40, 0.95), rgba(30, 58, 138, 0.9));
    padding: 3rem;
    border-radius: 20px;
    color: var(--white);
}

.rabbanim-responses h3 {
    color: var(--maroc-gold);
    font-size: 2.2rem;
    margin-bottom: 3rem;
    font-family: "Playfair Display", serif;
    text-align: center;
}

.rabbi-response {
    background: rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.rabbi-response:last-child {
    margin-bottom: 0;
}

.rabbi-response h4 {
    color: var(--maroc-gold);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-family: "Playfair Display", serif;
}

.rabbi-response blockquote {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-style: italic;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.95);
}

/* ===== TITRE DE SECTION (STYLE FINAL) ===== */
.section-title {
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--maroc-blue);
    position: relative;
    padding-bottom: 1.5rem;
    margin-bottom: 4rem;
    clear: both; /* Force le titre à se placer après les éléments flottants */
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .carousel-container {
        max-width: 100vw;
        padding: 0 1vw;
    }
    .carousel-item {
        width: 80vw !important;
        max-width: 95vw;
    }
    .timeline {
        max-width: 98vw;
    }
}

@media (max-width: 600px) {
    .section-title {
        font-size: 2rem;
        padding-bottom: 1rem;
        margin-bottom: 2rem;
    }
    .section-title::after {
        display: none;
    }
    .main-content, .details-section, .highlights-section, .siyata-section, .album-section, .reactions-section, .rabbanim-responses {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    .intro-box, .voyage-details, .timeline-content, .highlight-card, .album-card, .reaction-category, .rabbi-response {
        padding: 1rem !important;
        margin-bottom: 1.2rem !important;
    }
    .carousel-container {
        padding: 0 !important;
    }
    .carousel-item {
        width: 98vw !important;
        min-width: 0 !important;
        margin: 0 0.2rem !important;
    }
    .timeline {
        gap: 0.5rem !important;
    }
    .album-header h3, .highlights-section .section-title, .siyata-content h3, .rabbanim-responses h3 {
        font-size: 1.3rem !important;
        margin-bottom: 1.2rem !important;
    }
    .fun-quote {
        font-size: 0.85rem !important;
        padding: 0.7rem 1rem !important;
    }
}

@media (max-width: 1000px) {
    .timeline::before,
    .timeline::after {
        display: none !important;
    }
}

/* ===== MODAL LIGHTBOX ===== */
.lightbox {
    position: fixed;
    z-index: 9999;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
    opacity: 0;
    pointer-events: none;
}
.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}
.lightbox-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
    padding: 2rem 2rem 1.5rem 2rem;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.lightbox-img {
    max-width: 80vw;
    max-height: 70vh;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
    margin-bottom: 1rem;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute;
    background: rgba(0,0,0,0.2);
    border: none;
    color: #fff;
    font-size: 2rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.lightbox-close { 
    top: 1rem;
    right: 1rem; 
}
.lightbox-prev { 
    left: 1rem; 
    top: 50%; 
    transform: translateY(-50%); 
}
.lightbox-next { 
    right: 1rem; 
    top: 50%; 
    transform: translateY(-50%); 
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
    background: rgba(0,0,0,0.5);
}
.lightbox-counter {
    color: #333;
    font-size: 1rem;
    margin-top: 0.5rem;
}
@media (max-width: 600px) {
    .lightbox-content {
        padding: 0.5rem;
        max-width: 98vw;
        max-height: 98vh;
    }
    .lightbox-img {
        max-width: 95vw;
        max-height: 80vh;
    }
}