/* =====================================
   🌌 1. BASE DU SITE (le décor général)
===================================== */


/* 👉 Le fond + texte du site */

body {
    margin: 0;
    padding-top: 80px;
    font-family: Georgia, serif;
    color: #f3ead8;
    /* 🌌 ciel sombre */
    background: radial-gradient(circle at top, #0b1a2e, #050b15);
    min-height: 100vh;
    /* ✨ apparition douce */
    animation: fadeIn 1.2s ease;
}


/* =====================================
   ✨ 2. ÉTOILES (effet magique)
===================================== */


/* 👉 couche invisible au-dessus du fond */

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    /* ⭐ petites étoiles */
    background-image: radial-gradient(1px 1px at 10% 20%, white, transparent), radial-gradient(1px 1px at 80% 30%, #fff8dc, transparent), radial-gradient(2px 2px at 50% 80%, #fff, transparent);
    opacity: 0.4;
    animation: starsMove 40s linear infinite;
}


/* 👉 animation des étoiles */

@keyframes starsMove {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-200px);
    }
}


/* =====================================
   🧭 3. NAVBAR (menu en haut)
===================================== */

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    gap: 25px;
    padding: 15px;
    background: rgba(5, 11, 21, 0.95);
    backdrop-filter: blur(10px);
}

.navbar a {
    color: #f5deb3;
    text-decoration: none;
    font-size: 18px;
    transition: 0.3s;
}

.navbar a:hover {
    color: white;
    text-shadow: 0 0 10px rgba(214, 179, 106, 0.8);
}


/* =====================================
   🏷 4. TITRES
===================================== */

.titre-page {
    text-align: center;
    font-size: 42px;
    text-shadow: 0 0 15px rgba(214, 179, 106, 0.5);
}


/* =====================================
   📷 5. GALERIE (photos)
===================================== */

.gallery {
    display: grid;
    /* 👉 responsive automatique */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    padding: 40px;
}


/* 👉 image */

.photo {
    width: 100%;
    border-radius: 18px;
    transition: 0.4s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}


/* 👉 effet au survol */

.photo:hover {
    transform: scale(1.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    cursor: pointer;
}


/* =====================================
   🎬 6. LIGHTBOX (zoom plein écran)
===================================== */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.lightbox img {
    max-width: 85%;
    max-height: 85%;
    border-radius: 20px;
    animation: zoomCinema 0.6s ease;
}


/* 👉 animation zoom */

@keyframes zoomCinema {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}


/* 👉 boutons gauche / droite */

.nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    color: white;
    cursor: pointer;
}

.prev {
    left: 20px;
}

.next {
    right: 20px;
}


/* =====================================
   🗂 7. ALBUMS
===================================== */

.album-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.album-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: 0.5s;
}

.album-card:hover img {
    transform: scale(1.1);
}


/* 👉 titre sur image */

.album-title {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 15px;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 2px;
    background: linear-gradient( transparent, rgba(0, 0, 0, 0.85));
    color: #f5deb3;
    text-shadow: 0 0 10px rgba(214, 179, 106, 0.5);
}


/* =====================================
   🎵 8. AUDIO
===================================== */

.sound-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    padding: 12px;
    backdrop-filter: blur(8px);
    transition: 0.3s;
}

.sound-btn:hover {
    transform: scale(1.1);
}


/* =====================================
   🔐 9. LOGIN
===================================== */

.login-box {
    width: 320px;
    margin: 120px auto;
    padding: 40px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.login-box input {
    width: 100%;
    padding: 12px;
    margin: 15px 0;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}


/* =====================================
   🏠 10. ACCUEIL
===================================== */

.home-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: calc(100vh - 80px);
}

.home-title {
    font-size: 42px;
    color: #f5deb3;
}

.home-text {
    max-width: 700px;
    font-size: 20px;
    line-height: 1.8;
}


/* =====================================
   📱 11. MOBILE
===================================== */

@media (max-width: 768px) {
    .gallery {
        gap: 15px;
        padding: 15px;
    }
    .nav {
        font-size: 35px;
    }
    .lightbox img {
        max-width: 95%;
        max-height: 75%;
    }
}


/* =====================================
   ✨ ANIMATIONS
===================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}


/* =====================================
   🎯 BOUTONS PROPRES (CORRECTION)
===================================== */

.btn {
    display: inline-block;
    padding: 12px 24px;
    margin: 10px;
    border-radius: 30px;
    border: none;
    background: linear-gradient(135deg, #d6b36a, #fff2c7);
    color: #07111f;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(214, 179, 106, 0.6);
}


/* =====================================
   🌍 BOUTONS LANGUE (FIX FINAL)
===================================== */

.btn-lang {
    display: inline-block;
    padding: 10px 16px;
    margin: 5px;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #f5deb3;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-lang:hover {
    background: linear-gradient(135deg, #d6b36a, #fff2c7);
    color: #07111f;
    transform: scale(1.05);
}


/* =====================================
   🌍 POUR GHAYEB
===================================== */

.ghayeb-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}


/* =====================================
   👤 GHAYEB (POLICE + STYLE FIX)
===================================== */

.ghayeb-card {
    font-family: 'Georgia', serif;
    /* 👉 français élégant */
    font-size: 22px;
    line-height: 1.8;
    max-width: 700px;
    width: 80%;
    text-align: center;
    padding: 50px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    box-shadow: 0 15px 60px rgba(0, 0, 0, 0.5);
}


/* =====================================
   🌍 LANG SWITCH (CENTRÉ)
===================================== */

.lang-switch {
    display: flex;
    justify-content: center;
    /* 👉 centre horizontal */
    align-items: center;
    gap: 15px;
    margin-top: 30px;
}


/* =====================================
   🇮🇷 TEXTE PERSAN
===================================== */

.persan {
    direction: rtl;
    text-align: center;
    font-family: 'Vazirmatn', serif;
    /* 👉 police persane */
    font-size: 34px;
}


/* =====================================
   🎯 ACTIONS POÈMES (CENTRAGE)
===================================== */

.poeme-actions {
    display: flex;
    justify-content: center;
    /* 👉 centre les boutons */
    gap: 15px;
    margin-top: 20px;
}


/* =====================================
   📜 POÈMES (FIX COMPLET)
===================================== */

.poemes-container {
    width: 92%;
    max-width: 1000px;
    margin: 40px auto;
}

.poeme-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 60px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: 0.3s;
}

.poeme-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}


/* 🇮🇷 Persan */

.poeme-persan {
    direction: rtl;
    text-align: right;
    font-family: 'Vazirmatn', serif;
    font-size: 30px;
    line-height: 2.4;
    margin-bottom: 25px;
}


/* 🇫🇷 Français */

.poeme-francais {
    text-align: left;
    font-size: 20px;
    line-height: 2;
    opacity: 0.9;
}


/* 🎯 Boutons */

.poeme-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}


/* =====================================
   ✍️ FORMULAIRE AJOUT (FIX DESIGN)
===================================== */

.form-container {
    max-width: 700px;
    margin: 100px auto;
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

form textarea {
    width: 100%;
    max-width: 600px;
    margin: 15px auto;
    display: block;
    padding: 15px;
    border-radius: 15px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    font-size: 16px;
    line-height: 1.6;
}

form textarea:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(214, 179, 106, 0.6);
}


/* =====================================
   🎬 VIDEOS FIX FINAL
===================================== */

.video-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    padding: 40px;
}

.video-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.video-card video {
    width: 100%;
    max-height: 250px;
    border-radius: 12px;
    object-fit: cover;
}


/* =====================================
   ✨ NAVBAR HOVER PREMIUM (SAFE)
===================================== */

.navbar a {
    position: relative;
}

.navbar a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, #d6b36a, #fff2c7);
    transition: 0.3s;
}

.navbar a:hover::after {
    width: 100%;
}


/* =====================================
   💎 EFFET PREMIUM CARTES
===================================== */

.poeme-card,
.album-card,
.video-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.poeme-card:hover,
.album-card:hover,
.video-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
}


/* =====================================
   🎬 APPARITION DOUCE
===================================== */

.page-content {
    animation: fadeInPage 0.8s ease;
}

@keyframes fadeInPage {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =====================================
   🎥 EFFET CINÉMA IMAGES
===================================== */

.photo {
    filter: brightness(0.95) contrast(1.05);
}

.photo:hover {
    filter: brightness(1.05) contrast(1.1);
}


/* =====================================
   🏷 TITRES PREMIUM
===================================== */

.titre-page {
    text-align: center;
    font-size: 42px;
    letter-spacing: 3px;
    margin-top: 30px;
    background: linear-gradient(90deg, #d6b36a, #fff2c7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}


/* =====================================
   📜 LIGNES DES POÈMES
===================================== */

.ligne {
    display: block;
    margin-bottom: 12px;
}


/* 🇫🇷 lignes françaises */

.ligne-fr {
    line-height: 2;
}


/* 🇮🇷 lignes persanes */

.ligne-persan {
    line-height: 2.4;
}

.actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}


/* Respecte les retours à la ligne dans les poèmes */

.poeme-persan,
.poeme-francais {
    white-space: pre-wrap;
    line-height: 1.6;
    /* Ajoute un peu d'air entre les vers */
}


/* Pour les vidéos */

.video-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.video-card video {
    width: 100%;
    /* La vidéo prend toute la largeur de sa "carte" */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.video-title {
    text-align: center;
    font-size: 0.9em;
    margin-top: 10px;
    color: #555;
}


/* =====================================
   👥 ALIGNEMENT CÔTE À CÔTE (FLEXBOX)
===================================== */

.poeme-contenu-bilingue {
    display: flex;
    flex-direction: row-reverse;
    /* 👈 Important : affiche le persan à droite en premier, puis le français à gauche */
    justify-content: space-between;
    gap: 40px;
    /* Espace entre les deux langues */
    align-items: flex-start;
}

.poeme-colonne-persan {
    flex: 1;
    direction: rtl;
    text-align: right;
    font-family: 'Vazirmatn', serif;
    font-size: 28px;
    line-height: 2.2;
    white-space: pre-wrap;
}

.poeme-colonne-francais {
    flex: 1;
    text-align: left;
    font-family: 'Georgia', serif;
    font-size: 18px;
    line-height: 1.8;
    white-space: pre-wrap;
    opacity: 0.95;
    border-right: 1px solid rgba(214, 179, 106, 0.2);
    /* Petite ligne dorée subtile pour séparer */
    padding-right: 20px;
}


/* 📱 ADAPTATION POUR IPHONE / MOBILE */

@media (max-width: 768px) {
    .poeme-contenu-bilingue {
        flex-direction: column;
        /* 👈 Sur mobile, les langues se remettent l'une sous l'autre */
        gap: 25px;
    }
    .poeme-colonne-francais {
        border-right: none;
        padding-right: 0;
        border-top: 1px solid rgba(214, 179, 106, 0.2);
        /* Ligne de séparation horizontale sur mobile */
        padding-top: 20px;
    }
}


/* =====================================
   🎯 ALIGNEMENT STRICT VERS À VERS
===================================== */

.poeme-table-bilingue {
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* Éspace entre chaque vers */
    width: 100%;
}

.rangee-bilingue {
    display: flex;
    flex-direction: row-reverse;
    /* Persan à droite, Français à gauche */
    justify-content: space-between;
    align-items: center;
    /* Aligne verticalement le vers et sa traduction */
    gap: 30px;
    width: 100%;
}

.cellule-persan {
    flex: 1;
    direction: rtl;
    text-align: right;
    font-family: 'Vazirmatn', serif;
    font-size: 26px;
    line-height: 1.4;
    color: #f3ead8;
}

.cellule-francaise {
    flex: 1;
    text-align: left;
    font-family: 'Georgia', serif;
    font-size: 18px;
    line-height: 1.4;
    color: #f5deb3;
    opacity: 0.9;
    border-right: 1px solid rgba(214, 179, 106, 0.15);
    padding-right: 20px;
    /* 🛡️ Sécurités anti-débordement */
    white-space: normal;
    /* Permet le retour à la ligne si le vers français est trop long */
    word-wrap: break-word;
}


/* 📱 ADAPTATION IPHONE */

@media (max-width: 768px) {
    .rangee-bilingue {
        flex-direction: column;
        /* Repasse l'un sous l'autre sur petit écran */
        align-items: stretch;
        gap: 8px;
        margin-bottom: 15px;
    }
    .cellule-francaise {
        border-right: none;
        padding-right: 0;
        border-top: 1px dashed rgba(214, 179, 106, 0.1);
        padding-top: 8px;
    }
}

.pas-de-donnees {
    text-align: center;
    padding: 40px;
    font-size: 1.2rem;
    color: #666;
    font-style: italic;
    grid-column: 1 / -1;
    /* Si ta classe .gallery utilise CSS Grid, cela centrera le message sur toute la largeur */
}