/* ==========================================
   FICHIER CSS POUR LA PAGE RABBANIM
   Chargé avec succès !
   ========================================== */

/* ANCIEN HERO COMMENTÉ - REMPLACÉ PAR L'EN-TÊTE UNIFIÉ */
/*
.page-hero {
    background: linear-gradient(135deg, #1a5490 0%, #3d8ae5 100%);
    padding: 150px 0 80px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    contain: layout paint;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 80% 40%, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.6;
    z-index: 1;
    will-change: transform;
    transform: translateZ(0);
}

.page-hero::after {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.2) 0%, transparent 70%);
    z-index: 0;
}

.page-hero .container {
    position: relative;
    z-index: 2;
}

.page-hero h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
}

.page-hero h1::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--secondary);
    border-radius: 10px;
}

.page-hero p.lead {
    font-size: 1.5rem;
    max-width: 800px;
    margin: 2rem auto 0;
    line-height: 1.7;
    opacity: 0.9;
    font-weight: 300;
}
*/

/* Styles spéciaux pour les cartes des Rabbanim - Version améliorée */
.rav-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 250, 0.95));
    backdrop-filter: blur(15px);
    border-radius: 25px;
    padding: 2.5rem 2rem;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.08),
        0 8px 32px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.9);
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 5px solid transparent;
    background-clip: padding-box;
    margin-bottom: 2.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.rav-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, 
        rgba(26, 84, 144, 0.02) 0%, 
        rgba(255, 215, 0, 0.02) 50%, 
        rgba(26, 84, 144, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
    z-index: 0;
}

.rav-card:hover::before {
    opacity: 1;
}

.rav-card:hover {
    transform: translateY(-12px);
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.12),
        0 15px 40px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border-bottom-color: var(--secondary);
    z-index: 5;
}

/* Container photo avec gestion améliorée du contenu */
/* Photo container et images - solution révisée */
.rav-card .photo-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 4px solid var(--primary);
    background-color: #fff;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    transition: all 0.4s ease;
}

/* Au survol, agrandir le container */
.rav-card:hover .photo-container {
    border-radius: 10px;
    width: 100%;
    height: 340px; /* Hauteur augmentée pour mieux accueillir l'image complète */
    margin-bottom: 2rem;
    border: 1px solid var(--primary); /* Légère bordure pour délimiter */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
    z-index: 10;
    background-color: white;
    padding: 5px; /* Ajout d'un léger padding pour éviter que l'image touche les bords */
}

/* Effet de survol pour les photos */
.rav-card:hover .portrait-photo {
    opacity: 0;
}

.rav-card .chiour-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Changement à 'contain' pour afficher l'image entière */
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 0;
    z-index: 2;
    background-color: white; /* Assure un fond blanc pour les images */
}

.rav-card:hover .chiour-photo {
    opacity: 1;
    border-radius: 10px;
}

.portrait-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: opacity 0.3s ease;
    z-index: 1;
}

/* Badge pour la photo de chiour */
.chiour-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: var(--secondary);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(10px);
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.rav-card:hover .chiour-badge {
    opacity: 1;
    transform: translateY(0);
}

/* Effet de fond au survol - optimisé */
.rav-card .photo-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.03);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    will-change: opacity;
}

.rav-card:hover .photo-container::before {
    opacity: 1;
}

/* Espacement et alignement des cartes */
.rav-card {
    margin-bottom: 2.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem; /* Réduire le padding pour un look plus élégant */
}

.rav-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

/* Amélioration des titres */
.rav-title {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.6rem;
    font-weight: 800;
    position: relative;
    display: inline-block;
    contain: content;
    z-index: 1;
    background: linear-gradient(135deg, var(--primary), #2c5aa0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rav-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--secondary), transparent);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.rav-card:hover .rav-title::after {
    width: 80px;
}

/* Amélioration du badge directeur */
.rav-role {
    color: white;
    font-weight: 700;
    margin-bottom: 0.8rem;
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    background: linear-gradient(135deg, var(--secondary), #ffcc00);
    border: none;
    min-height: auto;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
}

.rav-role::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #ffcc00, var(--secondary));
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.rav-card:hover .rav-role::before {
    opacity: 1;
}

/* Amélioration des dates */
.rav-since {
    color: var(--gray-600);
    font-size: 1rem;
    font-style: italic;
    font-weight: 500;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

/* Amélioration des descriptions */
.rav-description {
    color: var(--gray-700);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-top: 0.5rem;
    text-align: left;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    position: relative;
    z-index: 1;
    /* Suppression de max-height et overflow-y pour éliminer les barres de défilement */
}

.rav-description p {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.2rem;
    font-weight: 400;
}

.rav-description p:before {
    content: '▶'; /* Utilisation d'une flèche plus moderne */
    position: absolute;
    left: 0;
    top: 0;
    color: var(--secondary);
    font-size: 10px;
    font-weight: bold;
}

/* Responsive */
@media (min-width: 768px) {
    .rav-card {
        margin: 1rem;
    }
    
    .rav-card .photo-container {
        width: 240px;
        height: 240px;
    }
}

/* Style pour la section rabbanim - Version améliorée */
.rabbanim-section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

/* Suppression du motif de fond pour montrer le background global */
.rabbanim-section::before {
    display: none;
}

/* Suppression de l'effet d'après pour montrer le background global */
.rabbanim-section::after {
    display: none;
}

@keyframes patternFloat {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}
