/* CSS pour la page Histoire */

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(26, 84, 144, 0.8), rgba(26, 84, 144, 0.8)), url('../images/beit_hamidrash.jpg') center/cover;
    color: white;
    padding: 100px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    to { transform: rotate(360deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #ffffff 0%, #ffd700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.3rem;
    opacity: 0.95;
    line-height: 1.6;
}

/* Timeline Section */
.timeline-section {
    padding: 80px 20px;
    /* Fond identique aux autres pages du site */
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
}

.timeline-container {
    max-width: 1200px;
    margin: 0 auto;
}

.timeline-header {
    text-align: center;
    margin-bottom: 60px;
}

.timeline-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.timeline {
    position: relative;
    padding: 40px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #ffd700, #1a5490);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 80px;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 0.8s forwards;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: auto;
    margin-right: 0;
}

.timeline-item:nth-child(even) .timeline-date {
    left: auto;
    right: calc(50% + 40px);
    text-align: right;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-content {
    width: calc(50% - 60px);
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 30px;
    width: 20px;
    height: 20px;
    background: white;
    transform: rotate(45deg);
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -10px;
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -10px;
}

.timeline-icon {
    position: absolute;
    left: 50%;
    top: 30px;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #1a5490 0%, #2c7fd8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.timeline-date {
    position: absolute;
    left: calc(50% + 40px);
    top: 35px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #1a5490;
}

.timeline-content h3 {
    color: #1a5490;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.timeline-content img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin: 15px 0;
}

.timeline-details {
    list-style: none;
    margin-top: 15px;
    padding: 0;
}

.timeline-details li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    line-height: 1.6;
}

.timeline-details li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #ffd700;
    font-weight: bold;
}

/* Gallery Section */
.gallery-section {
    padding: 60px 20px;
    background: white;
}

.gallery-header {
    text-align: center;
    margin-bottom: 40px;
}

.gallery-header h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.annual-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.annual-photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    cursor: pointer;
}

.annual-photo-item:hover {
    transform: scale(1.05);
}

.annual-photo-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.annual-photo-item .year-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 20px 15px 10px;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Memorial Section - Section des Maîtres */
.memorial-section {
    padding: 70px 20px 60px;
    background: 
        linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    position: relative;
    overflow: hidden;
}

.memorial-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(26, 84, 144, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.memorial-container {
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.memorial-header {
    text-align: center;
    margin-bottom: 60px;
}

.memorial-header h2 {
    font-size: 3.2rem;
    color: #f8fafc;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 15px;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #f8fafc 0%, #d4af37 50%, #f8fafc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.memorial-subtitle {
    font-size: 1.4rem;
    color: #cbd5e1;
    font-style: italic;
    font-weight: 300;
    margin-bottom: 30px;
    opacity: 0.9;
}

.memorial-divider {
    width: 160px;
    height: 3px;
    background: linear-gradient(to right, transparent, #d4af37, #f59e0b, #d4af37, transparent);
    margin: 0 auto;
    border-radius: 2px;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

/* Titre memorial RTL et centré */
.memorial-title {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.1) 0%, rgba(212, 175, 55, 0.05) 100%);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 15px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.memorial-title h3 {
    font-size: 2.2rem;
    color: #d4af37;
    font-family: 'David Libre', serif;
    font-weight: bold;
    margin: 0;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
    letter-spacing: 1px;
    background: linear-gradient(135deg, #d4af37 0%, #f59e0b 50%, #d4af37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    direction: rtl;
    text-align: center;
}

.title-divider {
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, transparent, #d4af37, transparent);
    margin: 15px auto 0;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

/* Layout principal pour organiser les sections */
.masters-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
}

/* NOUVEAU DESIGN : CADRE AUTOUR DES DÉCÉDÉS */
.deceased-section {
    flex: 3;
    max-width: 900px;
    position: relative;
}

/* Contour/Cadre décoratif autour des décédés */
.deceased-memorial-frame {
    position: relative;
    border: 3px solid rgba(212, 175, 55, 0.4);
    border-radius: 25px;
    padding: 40px 20px 20px;
    background: linear-gradient(145deg, 
        rgba(212, 175, 55, 0.05) 0%, 
        rgba(212, 175, 55, 0.02) 50%,
        rgba(212, 175, 55, 0.05) 100%);
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.1),
        0 0 30px rgba(212, 175, 55, 0.15);
    margin-top: 20px;
}

/* Titre en haut du cadre */
.deceased-frame-title {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(145deg, #1e293b 0%, #334155 100%);
    padding: 8px 30px;
    border: 2px solid rgba(212, 175, 55, 0.5);
    border-radius: 25px;
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(212, 175, 55, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 10;
}

.deceased-frame-title h3 {
    font-size: 1.6rem;
    color: #d4af37;
    font-family: 'David Libre', serif;
    font-weight: bold;
    margin: 0;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.5),
        0 0 10px rgba(212, 175, 55, 0.3);
    letter-spacing: 1px;
    background: linear-gradient(135deg, #d4af37 0%, #f59e0b 50%, #d4af37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    direction: rtl;
    text-align: center;
    white-space: nowrap;
}

/* Ornements décoratifs aux coins - ANIMATION SUPPRIMÉE */
.deceased-frame-title::before,
.deceased-frame-title::after {
    content: '✦';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #d4af37;
    font-size: 1.2rem;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
    /* animation: sparkle 3s ease-in-out infinite alternate; SUPPRIMÉ */
}

.deceased-frame-title::before {
    left: -15px;
}

.deceased-frame-title::after {
    right: -15px;
}

/* ANIMATION SPARKLE SUPPRIMÉE
@keyframes sparkle {
    0% { opacity: 0.6; transform: translateY(-50%) scale(0.8); }
    100% { opacity: 1; transform: translateY(-50%) scale(1.2); }
}
*/

/* Section des vivants */
.living-section {
    flex: 1;
    max-width: 280px;
    margin-top: 60px; /* Alignement avec le cadre des décédés */
}

/* Grille pour les décédés à l'intérieur du cadre */
.deceased-plaques {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    justify-content: center;
    align-items: flex-start;
}

/* Style pour la plaque standalone d'Ittah */
.memorial-plaque.standalone {
    max-width: 280px;
    margin: 0 auto;
}

/* Anciens styles pour compatibilité */
.memorial-plaques {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    justify-content: center;
    align-items: flex-start;
}

.memorial-plaque {
    background: linear-gradient(145deg, #1e293b 0%, #334155 100%);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 25px rgba(212, 175, 55, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    padding: 30px 20px 25px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateY(0);
    animation: plaque-entrance 0.8s ease forwards;
    overflow: visible; /* CHANGÉ POUR QUE LES BOUGIES SOIENT VISIBLES */
    min-height: 450px;
    max-height: none;
    display: flex;
    flex-direction: column;
}

.memorial-plaque::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        #d4af37 0%, 
        #f59e0b 25%, 
        #fbbf24 50%, 
        #f59e0b 75%, 
        #d4af37 100%);
    background-size: 200% 100%;
    /* animation: shimmer 4s ease-in-out infinite; SUPPRIMÉ */
}

/* ANIMATION SHIMMER SUPPRIMÉE
@keyframes shimmer {
    0%, 100% { background-position: -200% 0; }
    50% { background-position: 200% 0; }
}
*/

.memorial-plaque:nth-child(1) { animation-delay: 0.1s; }
.memorial-plaque:nth-child(2) { animation-delay: 0.3s; }
.memorial-plaque:nth-child(3) { animation-delay: 0.5s; }
.memorial-plaque:nth-child(4) { animation-delay: 0.7s; }

@keyframes plaque-entrance {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.memorial-plaque:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(212, 175, 55, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(212, 175, 55, 0.6);
}

.memorial-plaque.living {
    border-color: rgba(34, 197, 94, 0.4);
}

.memorial-plaque.living::before {
    background: linear-gradient(90deg, 
        #22c55e 0%, 
        #16a34a 25%, 
        #15803d 50%, 
        #16a34a 75%, 
        #22c55e 100%);
    background-size: 200% 100%;
    /* Animation supprimée pour éviter l'effet de défilement */
}

/* Animation de feu autour des cadres des maîtres décédés - optimisée */
@keyframes fireGlow {
    0%, 100% { box-shadow: 0 0 5px 2px rgba(255, 140, 0, 0.5), 0 0 10px 5px rgba(255, 70, 0, 0.3); }
    25% { box-shadow: 0 0 8px 4px rgba(255, 160, 0, 0.6), 0 0 15px 7px rgba(255, 90, 0, 0.4); }
    50% { box-shadow: 0 0 12px 5px rgba(255, 180, 0, 0.7), 0 0 20px 10px rgba(255, 110, 0, 0.5); }
    75% { box-shadow: 0 0 8px 4px rgba(255, 160, 0, 0.6), 0 0 15px 7px rgba(255, 90, 0, 0.4); }
}

/* Animation pour simuler les flammes dansantes */
@keyframes flameDance {
    0%, 100% { transform: scaleY(1.0) scaleX(1.0) translateY(0); }
    25% { transform: scaleY(1.1) scaleX(0.95) translateY(-1px); }
    50% { transform: scaleY(1.15) scaleX(0.9) translateY(-2px); }
    75% { transform: scaleY(1.05) scaleX(0.98) translateY(-1px); }
}

@keyframes fireBorder {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 200%; }
}

.memorial-plaque.deceased {
    position: relative;
    border: none;
    background-clip: padding-box;
    animation: fireGlow 3s infinite alternate;
    transform: translateZ(0); /* Optimisation des performances */
    will-change: transform, box-shadow; /* Indication au navigateur d'optimiser */
    backface-visibility: hidden; /* Évite les problèmes de rendu */
    z-index: 1;
}

.memorial-plaque.deceased::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    z-index: -1;
    border-radius: 15px;
    background: linear-gradient(
        45deg, 
        #ff8c00, /* Orange vif */
        #ffd700, /* Or */
        #ff4500, /* Rouge orangé */
        #ffa500, /* Orange */
        #ff8c00, /* Orange vif */
        #ffd700  /* Or */
    );
    background-size: 200% 200%;
    animation: 
        fireBorder 8s linear infinite,
        flameDance 2s ease-in-out infinite;
    filter: blur(2px);
    opacity: 0.9;
    transform: translateZ(0); /* Optimisation des performances */
    will-change: background-position, transform; /* Indication au navigateur d'optimiser */
}

/* Particules de feu autour des cadres */
@keyframes particleFly1 {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translate(-350px, -80px) scale(0.2) rotate(360deg); opacity: 0; }
}

@keyframes particleFly2 {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translate(350px, -80px) scale(0.2) rotate(-360deg); opacity: 0; }
}

@keyframes particleFly3 {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translate(350px, 80px) scale(0.2) rotate(360deg); opacity: 0; }
}

@keyframes particleFly4 {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translate(-350px, 80px) scale(0.2) rotate(-360deg); opacity: 0; }
}

.memorial-plaque.deceased::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    z-index: 1;
    pointer-events: none;
    overflow: visible;
}

.memorial-plaque.deceased .fire-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, rgba(255,215,0,0.9) 0%, rgba(255,140,0,0.7) 50%, rgba(255,69,0,0.3) 100%);
    border-radius: 50%;
    filter: blur(1px);
    box-shadow: 0 0 5px 2px rgba(255, 140, 0, 0.5);
    z-index: 10;
    opacity: 0;
}

.memorial-plaque.deceased .fire-particle:nth-child(1) {
    top: 0;
    left: 50%;
    animation: particleFly1 5s ease-out infinite;
    animation-delay: 0s;
}

.memorial-plaque.deceased .fire-particle:nth-child(2) {
    top: 0;
    left: 50%;
    animation: particleFly2 5s ease-out infinite;
    animation-delay: 1.2s;
}

.memorial-plaque.deceased .fire-particle:nth-child(3) {
    top: 100%;
    left: 50%;
    animation: particleFly3 5s ease-out infinite;
    animation-delay: 2.4s;
}

.memorial-plaque.deceased .fire-particle:nth-child(4) {
    top: 100%;
    left: 50%;
    animation: particleFly4 5s ease-out infinite;
    animation-delay: 3.6s;
}

/* BOUGIES REPOSITIONNÉES À GAUCHE DE LA PHOTO */
.memorial-candle {
    position: absolute;
    top: 80px; /* AU NIVEAU DE LA PHOTO */
    left: -30px; /* À GAUCHE DE LA PLAQUE */
    transform: none; /* PLUS DE CENTRAGE */
    z-index: 50;
    width: 50px;
    height: 110px;
    animation: candle-sway 3s ease-in-out infinite;
    pointer-events: none;
}

/* S'ASSURER QUE LES BOUGIES SONT TOUJOURS VISIBLES POUR LES DÉCÉDÉS */
.memorial-plaque.deceased .memorial-candle {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

@keyframes candle-sway {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(0.8deg); }
}

.memorial-candle .candle-base {
    width: 50px;
    height: 20px;
    background: linear-gradient(135deg, 
        #8B4513 0%, 
        #A0522D 20%, 
        #CD853F 40%, 
        #DEB887 60%, 
        #F5DEB3 80%, 
        #FAEBD7 100%);
    border-radius: 50% 50% 40% 40%;
    margin: 0 auto 5px;
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.7),
        inset 0 4px 8px rgba(255, 255, 255, 0.4),
        inset 0 -4px 8px rgba(0, 0, 0, 0.5),
        0 0 25px rgba(212, 175, 55, 0.3);
    border: 2px solid rgba(139, 69, 19, 1);
    position: relative;
}

.memorial-candle .candle-body {
    width: 32px;
    height: 60px;
    background: linear-gradient(135deg, 
        #ffffff 0%, 
        #fefefe 10%,
        #f8f8f8 20%, 
        #f0f0f0 30%, 
        #ffffff 40%,
        #f5f5f5 50%,
        #f0f0f0 60%,
        #eeeeee 70%,
        #f8f8f8 80%,
        #ffffff 90%,
        #fafafa 100%);
    border-radius: 5px 5px 3px 3px;
    position: relative;
    margin: 0 auto;
    box-shadow: 
        inset -5px 0 10px rgba(0, 0, 0, 0.3),
        inset 5px 0 10px rgba(255, 255, 255, 1),
        0 5px 25px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(212, 175, 55, 0.2);
    border: 1px solid rgba(200, 200, 200, 0.5);
}

.memorial-candle .candle-wick {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 12px;
    background: linear-gradient(to top, 
        #1a1a1a 0%, 
        #2c2c2c 20%, 
        #4a4a4a 40%, 
        #654321 60%, 
        #8B4513 80%,
        #A0522D 100%);
    border-radius: 2px 2px 0 0;
    box-shadow: 
        0 3px 6px rgba(0, 0, 0, 0.6),
        inset 0 0 3px rgba(255, 255, 255, 0.4),
        0 0 10px rgba(255, 140, 0, 0.5);
    animation: wick-glow 2s ease-in-out infinite alternate;
}

@keyframes wick-glow {
    0% { 
        box-shadow: 
            0 3px 6px rgba(0, 0, 0, 0.6),
            inset 0 0 3px rgba(255, 255, 255, 0.4);
    }
    100% { 
        box-shadow: 
            0 3px 8px rgba(255, 100, 0, 0.6),
            inset 0 0 5px rgba(255, 200, 0, 0.7),
            0 0 15px rgba(255, 140, 0, 0.5);
    }
}

/* FLAMME REPOSITIONNÉE */
.memorial-candle .candle-flame {
    position: absolute;
    top: -55px;
    left: 50%;
    transform: translateX(-50%); /* GARDE LE CENTRAGE RELATIF À LA BOUGIE */
    width: 26px;
    height: 38px;
    pointer-events: none;
    animation: flame-dance 1.8s ease-in-out infinite alternate;
    z-index: 60;
}

@keyframes flame-dance {
    0% { 
        transform: translateX(-50%) scale(1) rotate(-1.5deg);
        filter: hue-rotate(0deg) brightness(1);
    }
    25% { 
        transform: translateX(-50%) scale(1.15) rotate(1.8deg);
        filter: hue-rotate(10deg) brightness(1.1);
    }
    50% { 
        transform: translateX(-50%) scale(0.85) rotate(-0.8deg);
        filter: hue-rotate(-5deg) brightness(0.9);
    }
    75% { 
        transform: translateX(-50%) scale(1.08) rotate(1.5deg);
        filter: hue-rotate(15deg) brightness(1.05);
    }
    100% { 
        transform: translateX(-50%) scale(0.92) rotate(-1.2deg);
        filter: hue-rotate(5deg) brightness(0.95);
    }
}

.memorial-candle .flame-outer {
    position: absolute;
    top: 0;
    left: 0;
    width: 26px;
    height: 38px;
    background: radial-gradient(ellipse at center bottom,
        rgba(255, 40, 0, 1) 0%,
        rgba(255, 80, 0, 1) 5%,
        rgba(255, 100, 0, 0.99) 10%,
        rgba(255, 120, 0, 0.97) 18%,
        rgba(255, 140, 0, 0.94) 28%,
        rgba(255, 160, 0, 0.90) 38%,
        rgba(255, 180, 20, 0.85) 48%,
        rgba(255, 200, 50, 0.78) 58%,
        rgba(255, 220, 80, 0.70) 68%,
        rgba(255, 240, 120, 0.60) 78%,
        rgba(255, 255, 180, 0.45) 86%,
        rgba(255, 255, 220, 0.25) 93%,
        transparent 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flame-flicker 2.2s ease-in-out infinite;
    filter: blur(0.3px);
    box-shadow: 
        0 0 25px rgba(255, 120, 0, 0.9),
        0 0 45px rgba(255, 80, 0, 0.6),
        0 0 70px rgba(255, 60, 0, 0.4),
        0 -10px 20px rgba(255, 200, 50, 0.5);
}

@keyframes flame-flicker {
    0% { 
        opacity: 1; 
        transform: scale(1) scaleY(1);
    }
    12% { 
        opacity: 0.92; 
        transform: scale(1.12) scaleY(0.94);
    }
    25% { 
        opacity: 0.96; 
        transform: scale(0.88) scaleY(1.12);
    }
    38% { 
        opacity: 0.89; 
        transform: scale(1.06) scaleY(0.92);
    }
    50% { 
        opacity: 0.94; 
        transform: scale(0.92) scaleY(1.08);
    }
    62% { 
        opacity: 0.97; 
        transform: scale(1.14) scaleY(0.90);
    }
    75% { 
        opacity: 0.91; 
        transform: scale(0.95) scaleY(1.10);
    }
    88% { 
        opacity: 0.95; 
        transform: scale(1.02) scaleY(0.96);
    }
    100% { 
        opacity: 0.93; 
        transform: scale(1.08) scaleY(0.94);
    }
}

.memorial-candle .flame-inner {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 22px;
    background: radial-gradient(ellipse at center,
        rgba(255, 255, 220, 1) 0%,
        rgba(255, 255, 180, 0.98) 15%,
        rgba(255, 255, 150, 0.95) 25%,
        rgba(255, 240, 120, 0.90) 40%,
        rgba(255, 220, 100, 0.80) 55%,
        rgba(255, 200, 80, 0.65) 70%,
        rgba(255, 180, 60, 0.45) 82%,
        rgba(255, 160, 40, 0.25) 92%,
        transparent 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flame-inner-pulse 1.5s ease-in-out infinite alternate;
    filter: blur(0.15px);
}

@keyframes flame-inner-pulse {
    0% { 
        opacity: 0.95; 
        transform: translateX(-50%) scale(0.85) scaleY(1.15);
    }
    30% { 
        opacity: 1; 
        transform: translateX(-50%) scale(1.25) scaleY(0.88);
    }
    60% { 
        opacity: 0.88; 
        transform: translateX(-50%) scale(0.92) scaleY(1.18);
    }
    100% { 
        opacity: 0.97; 
        transform: translateX(-50%) scale(1.15) scaleY(0.85);
    }
}

/* Contenu des plaques avec hauteur flexible */
.plaque-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}
/* Photo dans la plaque */
.plaque-photo {
    width: 90px;
    height: 90px;
    margin: 20px auto 15px;
    border-radius: 50%;
    border: 3px solid rgba(212, 175, 55, 0.5);
    overflow: hidden;
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.3),
        0 0 15px rgba(212, 175, 55, 0.2),
        inset 0 1px 3px rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    flex-shrink: 0; /* Évite que la photo se rétrécisse */
}

.memorial-plaque:hover .plaque-photo {
    border-color: rgba(212, 175, 55, 0.8);
    transform: scale(1.05);
    box-shadow: 
        0 12px 30px rgba(0, 0, 0, 0.4),
        0 0 25px rgba(212, 175, 55, 0.4),
        inset 0 1px 3px rgba(255, 255, 255, 0.2);
}

.plaque-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.memorial-plaque:hover .plaque-photo img {
    transform: scale(1.1);
}

.no-photo-memorial {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: rgba(212, 175, 55, 0.6);
    background: linear-gradient(135deg, #334155, #475569);
}

/* Nom français */
.french-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #f8fafc;
    text-align: center;
    margin-bottom: 15px;
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.3px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 8px;
    flex-shrink: 0; /* Évite que le nom se rétrécisse */
}

/* Texte de la plaque */
.plaque-text {
    line-height: 1.5;
    color: #e2e8f0;
    font-family: 'David Libre', serif;
    margin: 0 15px;
    position: relative;
    z-index: 2;
    direction: rtl;
    text-align: center;
    flex: 1; /* Prend l'espace disponible */
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* Permet le scroll si le contenu dépasse */
}

.memorial-line {
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Deuxième ligne - לע"נ (pour décédés) - Style normal */
.memorial-plaque.deceased .memorial-line:nth-child(2) {
    font-size: 0.9rem;
    font-weight: bold;
    color: #cbd5e1;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.2px;
}

/* Autres lignes - Style normal pour les décédés */
.memorial-plaque.deceased .memorial-line:nth-child(4),
.memorial-plaque.deceased .memorial-line:nth-child(5),
.memorial-plaque.deceased .memorial-line:nth-child(6) {
    font-size: 0.85rem;
    color: #e2e8f0;
    margin-bottom: 6px;
}

/* Autres lignes - Style normal pour les vivants */
.memorial-plaque.living .memorial-line:nth-child(3),
.memorial-plaque.living .memorial-line:nth-child(4),
.memorial-plaque.living .memorial-line:nth-child(5) {
    font-size: 0.85rem;
    color: #e2e8f0;
    margin-bottom: 6px;
}

/* Troisième ligne - NOM DU RABBAN pour les décédés (ligne du nom) */
.memorial-plaque.deceased .memorial-line:nth-child(3) {
    font-size: 1.8rem !important;
    font-weight: 900 !important;
    color: #fbbf24 !important;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    margin: 15px 0 !important;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.6) !important;
    letter-spacing: 1px !important;
    line-height: 1.1 !important;
    text-transform: none !important;
    border: 2px solid rgba(251, 191, 36, 0.3) !important;
    border-radius: 12px !important;
    padding: 12px 8px !important;
    box-shadow: 
        0 0 20px rgba(251, 191, 36, 0.3),
        inset 0 0 15px rgba(251, 191, 36, 0.1) !important;
    animation: glow-name 3s ease-in-out infinite alternate !important;
}

/* Deuxième ligne - NOM DU RABBAN pour les vivants */
.memorial-plaque.living .memorial-line:nth-child(2) {
    font-size: 1.8rem !important;
    font-weight: 900 !important;
    color: #22c55e !important;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 50%, #15803d 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    margin: 15px 0 !important;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.6) !important;
    letter-spacing: 1px !important;
    line-height: 1.1 !important;
    text-transform: none !important;
    border: 2px solid rgba(34, 197, 94, 0.3) !important;
    border-radius: 12px !important;
    padding: 12px 8px !important;
    box-shadow: 
        0 0 20px rgba(34, 197, 94, 0.3),
        inset 0 0 15px rgba(34, 197, 94, 0.1) !important;
    animation: glow-name-living 3s ease-in-out infinite alternate !important;
}

@keyframes glow-name-living {
    0% {
        box-shadow: 
            0 0 20px rgba(34, 197, 94, 0.3),
            inset 0 0 15px rgba(34, 197, 94, 0.1);
    }
    100% {
        box-shadow: 
            0 0 30px rgba(34, 197, 94, 0.5),
            inset 0 0 25px rgba(34, 197, 94, 0.2);
    }
}

@keyframes glow-name {
    0% {
        box-shadow: 
            0 0 20px rgba(251, 191, 36, 0.3),
            inset 0 0 15px rgba(251, 191, 36, 0.1);
    }
    100% {
        box-shadow: 
            0 0 30px rgba(251, 191, 36, 0.5),
            inset 0 0 25px rgba(251, 191, 36, 0.2);
    }
}

/* Ligne נלב"ע mise en valeur pour les décédés */
.memorial-line[style*="נלב"] {
    font-size: 1.1rem !important;
    font-weight: bold !important;
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.1) !important;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    margin: 12px 0 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
    letter-spacing: 1px !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2) !important;
}

/* Styling spécial pour les lignes contenant נלב"ע */
.memorial-line:contains("נלב"),
.memorial-line:nth-last-child(2) {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    margin: 12px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

/* Dernière ligne - ת.נ.צ.ב.ה */
.memorial-line:last-child {
    font-size: 0.9rem;
    font-weight: bold;
    color: #d4af37;
    margin-top: 12px;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Ornement raffiné */
.plaque-ornament {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: linear-gradient(to right,
        transparent 0%,
        #d4af37 50%,
        transparent 100%);
    border-radius: 1px;
    opacity: 0.6;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.plaque-ornament::before {
    content: '✦';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #d4af37;
    font-size: 1rem;
    text-shadow: 0 0 6px rgba(212, 175, 55, 0.5);
}

/* Responsive */
@media (max-width: 1400px) {
    .masters-layout {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    
    .deceased-section {
        max-width: 100%;
    }
    
    .living-section {
        margin-top: 0;
        max-width: 350px;
    }
    
    .deceased-plaques {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .memorial-plaques {
        flex-direction: column;
    }
}

@media (max-width: 900px) {
    .deceased-plaques {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .deceased-frame-title {
        padding: 6px 20px;
    }
    
    .deceased-frame-title h3 {
        font-size: 1.4rem;
    }
    
    .deceased-memorial-frame {
        padding: 35px 15px 15px;
    }
}

@media (max-width: 768px) {
    .memorial-section {
        padding: 50px 20px 60px; /* AUGMENTÉ LE PADDING BOTTOM */
    }
    
    .deceased-plaques {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .deceased-frame-title {
        padding: 6px 20px;
        top: -18px;
    }
    
    .deceased-frame-title h3 {
        font-size: 1.3rem;
    }
    
    .deceased-memorial-frame {
        padding: 30px 12px 15px;
        border-radius: 20px;
    }
    
    .memorial-plaque {
        max-width: 350px;
        margin: 0 auto;
        padding: 25px 18px 20px;
        min-height: 400px; /* HAUTEUR RÉDUITE SUR MOBILE */
    }
    
    /* BOUGIES REPOSITIONNÉES SUR MOBILE */
    .memorial-candle {
        width: 40px;
        height: 90px;
        top: 70px; /* AJUSTÉ POUR MOBILE */
        left: -25px;
    }
    
    .memorial-candle .candle-base {
        width: 40px;
        height: 16px;
    }
    
    .memorial-candle .candle-body {
        width: 26px;
        height: 50px;
    }
    
    .memorial-candle .candle-wick {
        width: 3px;
        height: 10px;
        top: -6px;
    }
    
    .memorial-candle .candle-flame {
        width: 20px;
        height: 30px;
        top: -45px;
    }
    
    .memorial-candle .flame-outer {
        width: 20px;
        height: 30px;
    }
    
    .memorial-candle .flame-inner {
        width: 12px;
        height: 18px;
        top: 6px;
    }
    
    .memorial-header h2 {
        font-size: 2.5rem;
    }
    
    .memorial-subtitle {
        font-size: 1.2rem;
    }
    
    .plaque-text {
        margin: 0 12px;
    }
    
    .memorial-line {
        font-size: 0.8rem;
    }
    
    .memorial-plaque.deceased .memorial-line:nth-child(3) {
        font-size: 1.4rem !important;
        padding: 10px 6px !important;
        letter-spacing: 0.5px !important;
    }
    
    .memorial-plaque.living .memorial-line:nth-child(2) {
        font-size: 1.4rem !important;
        padding: 10px 6px !important;
        letter-spacing: 0.5px !important;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        margin-bottom: 50px;
    }
    
    .timeline-content {
        width: calc(100% - 80px);
        margin-left: 60px !important;
    }
    
    .timeline-icon {
        left: 30px;
    }
    
    .timeline-date {
        position: static;
        margin-bottom: 10px;
        text-align: left !important;
    }
    
    .timeline-content::before {
        left: -10px !important;
        right: auto !important;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .annual-photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* Modal pour les images - Compatible avec #imageModal */
.image-modal,
#imageModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.image-modal.active,
#imageModal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    width: 95%;
    height: 95%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalZoomIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes modalZoomIn {
    from {
        transform: scale(0.7);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.8),
        0 0 50px rgba(255, 215, 0, 0.1);
    transition: all 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    font-weight: 300;
    z-index: 10000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: #ffd700;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    font-weight: bold;
    z-index: 10000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    user-select: none;
}

.modal-nav:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: #ffd700;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
}

.modal-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.modal-prev {
    left: 30px;
}

.modal-next {
    right: 30px;
}

.modal-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.modal-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 500;
    max-width: 80%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Styles pour les images dans la timeline - ajout des effets hover */
.timeline-images-section img {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.timeline-images-section img:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.2),
        0 0 25px rgba(26, 84, 144, 0.3);
    border-radius: 12px;
}

/* Styles pour les photos annuelles */
.annual-photo-item img {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.annual-photo-item:hover img {
    transform: scale(1.05);
}

/* Responsive pour le modal */
@media (max-width: 768px) {
    .modal-close {
        top: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }
    
    .modal-nav {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .modal-prev {
        left: 20px;
    }
    
    .modal-next {
        right: 20px;
    }
    
    .modal-caption {
        bottom: 20px;
        padding: 12px 20px;
        font-size: 1rem;
        max-width: 90%;
    }
    
    .modal-content {
        width: 100%;
        height: 100%;
    }
}

/* =================================================
   AMÉLIORATIONS CSS POUR LA PAGE HISTOIRE.PHP
   Ajoutées le 29 janvier 2025
   ================================================= */

/* ====== AMÉLIORATIONS TIMELINE SECTION ====== */

/* Amélioration de l'animation d'entrée des éléments */
.timeline-content-box {
    /* Amélioration de l'effet hover existant */
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.timeline-content-box:hover {
    /* Ajout d'un effet de rotation subtile */
    transform: translateY(-10px) rotate(0.5deg);
    /* Amélioration des ombres */
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.15),
        0 15px 40px rgba(0, 0, 0, 0.1),
        0 5px 20px rgba(255, 215, 0, 0.3),
        0 0 50px rgba(26, 84, 144, 0.1);
}

/* Amélioration du badge année avec animation plus fluide */
.timeline-year-badge {
    /* Ajout d'un effet de brillance continue */
    background: linear-gradient(
        135deg, 
        #1a5490 0%, 
        #2a7abd 25%, 
        #ffd700 50%, 
        #2a7abd 75%, 
        #1a5490 100%
    );
    background-size: 400% 400%;
    animation: yearGradientShift 4s ease-in-out infinite, yearPulse 2s ease-in-out infinite;
}

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

/* Amélioration de l'effet de texte hébraïque */
.hebrew-text {
    /* Ajout d'un effet de breathing subtil */
    animation: hebrewBreathing 3s ease-in-out infinite;
    /* Amélioration de l'ombre */
    box-shadow: 
        0 5px 20px rgba(26, 84, 144, 0.15),
        inset 0 2px 10px rgba(255, 215, 0, 0.05),
        0 0 30px rgba(26, 84, 144, 0.05);
}

@keyframes hebrewBreathing {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Amélioration des images avec effet de zoom progressif */
.timeline-images-section img {
    /* Ajout d'un filtre d'amélioration */
    filter: brightness(0.95) contrast(1.05) saturate(1.1);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.timeline-images-section img:hover {
    /* Amélioration de l'effet hover */
    transform: scale(1.15) rotate(3deg);
    filter: brightness(1.1) contrast(1.15) saturate(1.2);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.25),
        0 0 40px rgba(255, 215, 0, 0.5),
        0 0 20px rgba(26, 84, 144, 0.3);
    border-radius: 15px;
    z-index: 15;
}

/* ====== AMÉLIORATIONS GALLERY SECTION ====== */

/* Amélioration de la grille des photos avec effet staggered */
.annual-photos-grid {
    /* Amélioration du layout avec hauteurs variables */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-auto-rows: minmax(220px, auto);
    gap: 25px;
}

/* Amélioration des photos annuelles avec effet de profondeur */
.annual-photo-item {
    /* Ajout d'un effet de bordure gradient animé */
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.12),
        0 3px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.annual-photo-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(26, 84, 144, 0.1) 0%, 
        transparent 50%, 
        rgba(255, 215, 0, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.annual-photo-item:hover {
    /* Amélioration de l'effet hover */
    transform: scale(1.08) translateY(-8px);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.2),
        0 10px 25px rgba(0, 0, 0, 0.15),
        0 0 30px rgba(255, 215, 0, 0.2);
}

.annual-photo-item:hover::before {
    opacity: 1;
}

/* Amélioration de l'image avec effet de zoom */
.annual-photo-item img {
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    filter: brightness(0.95) contrast(1.05);
}

.annual-photo-item:hover img {
    transform: scale(1.1);
    filter: brightness(1.05) contrast(1.1) saturate(1.1);
}

/* Amélioration du label année avec effet glassmorphism */
.annual-photo-item .year-label {
    /* Effet de verre moderne */
    background: 
        linear-gradient(145deg, 
            rgba(0, 0, 0, 0.7) 0%, 
            rgba(0, 0, 0, 0.5) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.annual-photo-item:hover .year-label {
    background: 
        linear-gradient(145deg, 
            rgba(26, 84, 144, 0.8) 0%, 
            rgba(255, 215, 0, 0.3) 100%);
    color: #ffd700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    transform: translateY(-5px);
}

/* ====== AMÉLIORATIONS MEMORIAL SECTION ====== */

/* Amélioration du fond de la section memorial */
.memorial-section {
    /* Fond simplifié sans particules */
    background: 
        linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    position: relative;
}

/* Amélioration de l'animation des bougies */
.memorial-candle {
    /* Ajout d'un effet de lueur autour de la bougie */
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.3));
    animation: candleGlow 4s ease-in-out infinite, candle-sway 3s ease-in-out infinite;
}

@keyframes candleGlow {
    0%, 100% { filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.3)); }
    50% { filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.5)); }
}

/* Amélioration de la flamme avec effet plus réaliste */
.memorial-candle .flame-outer {
    /* Ajout d'un effet de scintillement */
    animation: flame-flicker 2.2s ease-in-out infinite, flameScintillate 1.5s ease-in-out infinite;
}

@keyframes flameScintillate {
    0%, 100% { opacity: 1; }
    25% { opacity: 0.9; }
    50% { opacity: 0.95; }
    75% { opacity: 0.88; }
}

/* Amélioration des plaques commémoratives */
.memorial-plaque {
    /* Ajout d'un effet de respiration subtile */
    animation: plaque-entrance 0.8s ease forwards, plaqueBreathe 6s ease-in-out infinite;
}

@keyframes plaqueBreathe {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-2px) scale(1.005); }
}

/* Amélioration de l'effet hover des plaques */
.memorial-plaque:hover {
    /* Ajout d'un effet de rotation et élévation */
    transform: translateY(-15px) scale(1.03) rotate(-1deg);
    box-shadow: 
        0 35px 70px rgba(0, 0, 0, 0.6),
        0 15px 30px rgba(0, 0, 0, 0.4),
        0 0 50px rgba(212, 175, 55, 0.3),
        0 0 100px rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.8);
}

/* Amélioration de la photo dans la plaque */
.plaque-photo {
    /* Ajout d'un effet de lueur interne */
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.3),
        0 0 15px rgba(212, 175, 55, 0.2),
        inset 0 0 20px rgba(255, 255, 255, 0.1),
        inset 0 0 30px rgba(212, 175, 55, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.memorial-plaque:hover .plaque-photo {
    /* Amélioration de l'effet hover */
    transform: scale(1.1) rotate(5deg);
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.4),
        0 0 25px rgba(212, 175, 55, 0.4),
        inset 0 0 25px rgba(255, 255, 255, 0.2),
        inset 0 0 40px rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 1);
    filter: brightness(1.1) contrast(1.1);
}

/* Amélioration du cadre des décédés avec effet prismatique */
.deceased-memorial-frame {
    /* Ajout d'un effet de prisme subtil */
    background: 
        linear-gradient(145deg, 
            rgba(212, 175, 55, 0.08) 0%, 
            rgba(212, 175, 55, 0.03) 25%,
            rgba(26, 84, 144, 0.02) 50%,
            rgba(212, 175, 55, 0.03) 75%,
            rgba(212, 175, 55, 0.08) 100%);
    animation: frameShimmer 8s ease-in-out infinite;
}

@keyframes frameShimmer {
    0%, 100% { 
        border-color: rgba(212, 175, 55, 0.4);
        box-shadow: 
            0 15px 35px rgba(0, 0, 0, 0.3),
            inset 0 2px 0 rgba(255, 255, 255, 0.1),
            0 0 30px rgba(212, 175, 55, 0.15);
    }
    50% { 
        border-color: rgba(212, 175, 55, 0.6);
        box-shadow: 
            0 20px 45px rgba(0, 0, 0, 0.4),
            inset 0 2px 0 rgba(255, 255, 255, 0.15),
            0 0 40px rgba(212, 175, 55, 0.25);
    }
}

/* Amélioration du titre du cadre avec effet de couronne */
.deceased-frame-title h3 {
    /* Ajout d'ornements animés */
    position: relative;
}

.deceased-frame-title h3::before,
.deceased-frame-title h3::after {
    /* Amélioration des ornements avec effet de pulse */
    animation: ornamentPulse 3s ease-in-out infinite;
}

@keyframes ornamentPulse {
    0%, 100% { 
        opacity: 0.8; 
        transform: translateY(-50%) scale(1); 
        color: #d4af37;
    }
    50% { 
        opacity: 1; 
        transform: translateY(-50%) scale(1.2); 
        color: #ffd700;
    }
}

/* ====== AMÉLIORATIONS GÉNÉRALES ====== */

/* Amélioration du modal avec effet de flou avancé */
.image-modal.active,
#imageModal.active {
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
}

/* Amélioration de l'animation d'apparition du modal */
.modal-content {
    animation: modalZoomInEnhanced 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalZoomInEnhanced {
    0% {
        transform: scale(0.5) rotate(10deg);
        opacity: 0;
        filter: blur(10px);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
        filter: blur(0px);
    }
}

/* Amélioration des boutons de navigation du modal */
.modal-nav {
    /* Ajout d'un effet de pulse au hover */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: #ffd700;
    transform: translateY(-50%) scale(1.15);
    box-shadow: 
        0 0 30px rgba(255, 215, 0, 0.5),
        0 0 60px rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

/* Amélioration de l'en-tête de la galerie */
.gallery-header {
    /* Ajout d'un effet de texte brillant */
    position: relative;
}

.gallery-header h3 {
    background: linear-gradient(45deg, #1a5490, #ffd700, #1a5490);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShimmer 3s linear infinite;
}

@keyframes textShimmer {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* ====== AMÉLIORATIONS RESPONSIVE ====== */

/* Améliorations pour mobile */
@media (max-width: 768px) {
    /* Réduction des effets sur mobile pour de meilleures performances */
    .timeline-content-box:hover {
        transform: translateY(-5px) rotate(0deg);
    }
    
    .annual-photo-item:hover {
        transform: scale(1.05) translateY(-4px);
    }
    
    .memorial-plaque:hover {
        transform: translateY(-8px) scale(1.02) rotate(0deg);
    }
    
    /* Désactivation de certaines animations pour économiser la batterie */
    .memorial-candle {
        animation: candle-sway 3s ease-in-out infinite;
    }
    
    .timeline-year-badge {
        animation: yearPulse 2s ease-in-out infinite;
    }
}

/* ====== AMÉLIORATIONS D'ACCESSIBILITÉ ====== */

/* Respect des préférences de mouvement réduit */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .timeline-content-box:hover,
    .annual-photo-item:hover,
    .memorial-plaque:hover {
        transform: none;
    }
}

/* Amélioration du contraste pour l'accessibilité */
@media (prefers-contrast: high) {
    .timeline-year-badge {
        border: 3px solid #000;
    }
    
    .memorial-plaque {
        border: 3px solid #ffd700;
    }
    
    .annual-photo-item .year-label {
        background: rgba(0, 0, 0, 0.9);
        color: #ffd700;
    }
}