:root {
    --primary: #1a237e;
    --primary-light: #534bae;
    --primary-dark: #000051;
    --secondary: #c5a059;
    --secondary-light: #f8d087;
    --secondary-dark: #93732d;
    --white: #ffffff;
    --light: #f5f5f5;
    --dark: #121212;
    --text: #333333;
    --text-light: #666666;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --gold-glow: 0 0 20px rgba(197, 160, 89, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Assistant', sans-serif;
    color: var(--text);
    line-height: 1.6;
    background-color: var(--white);
    scroll-behavior: smooth;
}

h1,
h2,
h3,
.logo-text {
    font-family: 'Platypi', serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Nav */
.main-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 5px 0;
    transition: all 0.3s ease;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.container-full {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.nav-redesign {
    display: flex;
    justify-content: space-between;
    align-items: center;
    direction: ltr;
    /* Pour forcer links(left) et 770(right) comme demandé */
}

.nav-left,
.nav-redesign-optimized {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    direction: ltr;
    /* On force le ltr pour le positionnement physique des blocs (logo à gauche) */
}

.nav-group-left {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-group-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links-new {
    display: flex;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
    direction: rtl;
    /* Les liens eux-mêmes restent en RTL */
}

.nav-links-new a {
    text-decoration: none;
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links-new a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-links-new a:hover::after {
    width: 100%;
}

.synagogue-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    font-family: 'Platypi', serif;
    direction: rtl;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.nav-thumbnail {
    width: 65px;
    height: 65px;
    border-radius: 12px;
    overflow: hidden;
    /*border: 3px solid var(--secondary);*/
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-thumbnail:hover {
    transform: translateY(-3px) scale(1.05);
}

.nav-thumbnail img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

.logo-thumb {
    border-color: #2e3192;
    /* Bleu profond pour le logo */
}

.building-thumb {
    border-color: #d4af37;
    /* Doré pour le 770 */
}

.building-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 1100px) {
    .nav-links-new {
        gap: 15px;
    }

    .synagogue-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 900px) {
    .nav-redesign-optimized {
        flex-direction: column;
        gap: 15px;
    }

    .nav-group-left,
    .nav-group-right {
        width: 100%;
        justify-content: center;
    }

    .nav-group-left {
        order: 2;
    }

    .nav-group-right {
        order: 1;
    }
}

.nav-container {
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.logo-text span {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--secondary);
}

/* Hero */
.hero {
    height: 80vh;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding-top: 80px;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 10px;
}

.hero-content h3 {
    font-size: 2.2rem;
    color: var(--secondary);
    margin-bottom: 25px;
    font-weight: 700;
    font-family: 'Platypi', serif;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 40px;
    max-width: 800px;
}

/* Gallery Section */
.gallery-section {
    background-color: var(--primary-light);
    padding: 80px 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.gallery-item {
    position: relative;
    height: 350px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: white;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(46, 49, 146, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-item {
        height: 250px;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--secondary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--white);
    color: var(--white);
    margin-inline-start: 15px;
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary);
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-icon {
    width: 48px;
    height: 48px;
    color: var(--secondary);
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-dark);
}

.bg-light {
    background-color: var(--light);
}

.bg-dark {
    background-color: var(--dark);
}

.text-white {
    color: var(--white);
}

.text-white h2 {
    color: var(--secondary);
}

/* Shabbat Card Premium */
.shabbat-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.shabbat-main-info {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
    justify-content: center;
}

.shabbat-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    min-width: 300px;
}

.shabbat-poster {
    flex: 0 0 400px;
    max-width: 100%;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.shabbat-poster:hover {
    transform: scale(1.02);
}

.shabbat-poster img {
    width: 100%;
    height: auto;
    display: block;
}

.shabbat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--secondary), var(--primary));
}

.time-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    border-radius: 16px;
    transition: background 0.3s ease;
}

.time-item:hover {
    background: rgba(46, 49, 146, 0.03);
}

.time-icon-wrapper {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.05));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.time-icon-wrapper i {
    width: 28px;
    height: 28px;
}

.time-content h4 {
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.time-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-dark);
    font-family: 'Assistant', sans-serif;
}

.time-value.emphasize {
    color: var(--secondary-dark);
    font-family: 'Platypi', serif;
}

@media (max-width: 900px) {
    .shabbat-card {
        padding: 30px;
        gap: 20px;
    }

    .time-value {
        font-size: 1.3rem;
    }
}

/* Donation Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-10px);
}

.card-img {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.card-content {
    padding: 25px;
}

.card-content h3 {
    margin-bottom: 15px;
    color: var(--primary);
}

.progress-bar {
    height: 10px;
    background: #eee;
    border-radius: 5px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--secondary);
}

/* Courses */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 60px;
}

.course-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-inline-start: 4px solid var(--secondary);
    margin-bottom: 20px;
}

.course-item h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.course-time {
    font-size: 0.9rem;
    color: var(--secondary-light);
}

/* Footer */
.main-footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 80px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 80px;
    margin-bottom: 60px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s forwards;
}

.delay-1 {
    animation-delay: 0.3s;
}

.delay-2 {
    animation-delay: 0.6s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Building Section */
.building-section {
    padding: 0 0 100px;
}

.building-card {
    display: flex;
    background: var(--primary-dark);
    color: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    align-items: center;
}

.building-content {
    flex: 1;
    padding: 60px;
}

.building-content h2 {
    color: var(--secondary);
    margin-bottom: 20px;
}

.building-image {
    flex: 1;
    height: 400px;
}

.building-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .building-card {
        flex-direction: column;
    }

    .building-content {
        padding: 40px;
    }

    .building-image {
        width: 100%;
        height: 300px;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--white);
    margin: 10% auto;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalSlide 0.4s ease-out;
}

@keyframes modalSlide {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--light);
    padding-bottom: 15px;
}

.close-modal {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-light);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary);
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--light);
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus {
    border-color: var(--secondary);
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
}

.btn-text:hover {
    color: var(--primary);
}

/* Shabbat Journey Styles */
.shabbat-journey-container {
    margin-top: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    color: #1a237e;
}

.countdown-wrapper {
    text-align: center;
    margin-bottom: 40px;
}

.countdown-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a237e;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-family: 'Platypi', serif;
}

.timer-segment {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer-value {
    font-size: 3rem;
    font-weight: 800;
    color: #000051;
    line-height: 1;
}

.timer-unit {
    font-size: 0.8rem;
    color: #666666;
    margin-top: 5px;
}

.journey-timeline {
    position: relative;
    height: 60px;
    margin: 40px 0;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.timeline-track {
    position: absolute;
    height: 4px;
    left: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 2px;
}

.timeline-progress {
    position: absolute;
    height: 100%;
    left: 0;
    background: linear-gradient(to right, #c5a059, #1a237e);
    border-radius: 2px;
    transition: width 1s linear;
}

.timeline-points {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: space-between;
    z-index: 1;
}

.point {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.point:hover {
    transform: translateY(-5px);
}

.point-dot {
    width: 16px;
    height: 16px;
    background: white;
    border: 3px solid #c5a059;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.point.active .point-dot {
    background: #c5a059;
    box-shadow: 0 0 20px rgba(197, 160, 89, 0.3);
    transform: scale(1.3);
}

.point-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #666666;
}

.point.active .point-label {
    color: #1a237e;
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(197, 160, 89, 0); }
    100% { box-shadow: 0 0 0 0 rgba(197, 160, 89, 0); }
}

.pulse {
    animation: pulse-glow 2s infinite;
}


/* Enhanced Aesthetics & Animations */
.main-header {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.main-header.shrink {
    padding: 5px 0 !important;
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

.main-header.shrink .nav-thumbnail {
    width: 50px !important;
    height: 50px !important;
}

.main-header.shrink .synagogue-title {
    font-size: 1.3rem !important;
}

.card {
    transition: all 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.card:hover {
    transform: translateY(-12px) scale(1.02) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}


/* Hero Redesign with Image Side */
.hero-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    text-align: right;
}

.hero-text-side {
    flex: 1;
}

.hero-image-side {
    flex: 0 0 350px;
    display: flex;
    justify-content: center;
}

.rebbe-frame {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1;
    border-radius: 30px;
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    transform: rotate(3deg);
    transition: var(--transition);
    background: var(--white);
}

.rebbe-frame:hover {
    transform: rotate(0deg) scale(1.05);
    border-color: var(--secondary);
}

.rebbe-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 900px) {
    .hero-flex {
        flex-direction: column;
        text-align: center;
    }
    .hero-image-side {
        flex: 0 0 auto;
    }
    .rebbe-frame {
        max-width: 250px;
    }
}


/* Ceremonial Card & Unified Cohesion */
:root {
    --ceremonial-gold: #c5a059;
    --ceremonial-navy: #1a237e;
    --ceremonial-bg: rgba(255, 255, 255, 0.95);
}

.shabbat-card {
    background: var(--ceremonial-bg) !important;
    border: none !important;
    padding: 0 !important;
    overflow: visible !important;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12) !important;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* The Golden Glow Border */
.shabbat-card::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: conic-gradient(from 0deg, transparent, var(--ceremonial-gold), transparent 30%, transparent 70%, var(--ceremonial-gold), transparent);
    border-radius: 26px;
    z-index: -1;
    animation: rotate-border 6s linear infinite;
    opacity: 0.4;
}

@keyframes rotate-border {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ceremonial-header {
    background: var(--ceremonial-navy);
    color: white;
    padding: 30px;
    text-align: center;
    border-radius: 24px 24px 0 0;
    position: relative;
    overflow: hidden;
}

.ceremonial-header::before {
    content: '';
    position: absolute;
    font-size: 15rem;
    opacity: 0.05;
    top: -50px;
    left: -30px;
    color: white;
    pointer-events: none;
}

.ceremonial-body {
    padding: 40px;
}

.shabbat-grid-integrated {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.ceremonial-item {
    text-align: center;
    padding: 15px;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.ceremonial-item:hover {
    border-bottom-color: var(--ceremonial-gold);
}

.ceremonial-item i {
    color: var(--ceremonial-gold);
    margin-bottom: 10px;
    width: 24px;
    height: 24px;
}

.ceremonial-label {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    margin-bottom: 5px;
}

.ceremonial-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--ceremonial-navy);
}

.ceremonial-value.gold {
    color: var(--ceremonial-gold);
}

/* Refined Journey inside the card */
.integrated-journey {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 40px;
}

@media (max-width: 800px) {
    .shabbat-grid-integrated {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* Background Subtle Texture */
.section {
    position: relative;
    overflow: hidden;
}

.section::before {
    content: '';
    position: absolute;
    font-size: 20rem;
    opacity: 0.02;
    bottom: -100px;
    right: -50px;
    color: var(--primary);
    pointer-events: none;
    z-index: 0;
}


/* Compact Shabbat Card for Home Page */
.shabbat-card-compact {
    background: var(--ceremonial-bg);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    border: 1px solid rgba(197, 160, 89, 0.2);
}

.compact-time-item {
    text-align: center;
}

.compact-time-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.compact-time-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--ceremonial-navy);
}
