/* ==========================================================================
   1. VARIABLES & CONFIGURATION GÉNÉRALE
   ========================================================================== */
:root {
  --bleu-noir: #0F0F52;
  --bleu-carte: #0F0F52;
  --accent-or: #d4af37;
  --accent-or-clair: #f1d592;
  --texte: #e0e6ed;
  --texte-muted: #8892b0;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

body { 
  margin: 0; 
  font-family: 'Segoe UI', Roboto, -apple-system, sans-serif; 
  color: var(--texte); 
  background: var(--bleu-noir); 
  line-height: 1.6; 
  overflow-x: hidden;
}

.container { width: min(1100px, 92%); margin: 0 auto; padding: 1rem 0; }

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

.hero p {
    max-width: 800px;
    margin: 0 auto 30px auto; /* Centre le bloc de texte et ajoute de l'espace en bas */
}

/* ==========================================================================
   2. HEADER & NAVIGATION (AVEC EFFET ÉTOILES)
   ========================================================================== */
.site-header { 
  background: rgba(15, 15, 82, 0.98); 
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.15); 
  padding: 5px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.header-wrapper {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.site-title { 
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 5px 0;
  line-height: 1.2;
  background: linear-gradient(90deg, var(--accent-or), var(--accent-or-clair), var(--accent-or));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: goldShine 3s linear infinite;
}

.tagline {
  font-size: 0.85rem;
  color: var(--accent-or);
  letter-spacing: 1px;
  margin: 0 0 5px 0;
  text-transform: uppercase;
  opacity: 0.9;
}

.photo-profil {
  display: block;
  object-fit: cover;
  width: 150px;   
  height: auto;
}

.nav { display: flex; gap: 15px; margin: 0; }

.nav a {
  text-decoration: none;
  color: var(--texte);
  font-size: 0.9rem;
  font-weight: 500;
  transition: 0.3s;
  padding: 5px 10px;
  position: relative; /* Indispensable pour les étoiles */
  overflow: hidden;   /* Indispensable pour les étoiles */
  display: inline-block;
}

.nav a:hover { color: var(--accent-or); }

/* ==========================================================================
   3. CARTES ET GRILLES (PAGE INDEX)
   ========================================================================== */
.card-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
  gap: 2rem; 
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.3s ease;
}

.card { 
  background: var(--bleu-carte); 
  border: 1px solid rgba(255, 255, 255, 0.05); 
  border-radius: 12px; 
  padding: 2.5rem; 
  box-shadow: var(--shadow);
  transition: 0.3s ease;
  position: relative; /* Pour les étoiles */
  overflow: hidden;   /* Pour les étoiles */
  cursor: pointer;
}

.card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-or);
}

.card h3 { color: var(--accent-or); margin-top: 0; font-size: 1.4rem; }

/* ==========================================================================
   4. PAGES SPÉCIFIQUES (VOYANCE & DÉFUNT)
   ========================================================================== */
.page-voyance, .page-defunt {
    position: relative;
    padding: 40px;
    border-radius: 15px;
    overflow: hidden;
    background: var(--bleu-carte);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

/* Background images avec opacité */
.page-voyance::before, .page-defunt::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.page-voyance::before { 
    background-image: url('../../Images/cartes5.jpg'); 
    opacity: 0.20; 
}

.page-defunt::before { 
    background-image: url('../../Images/coccinelle.jpg'); 
    opacity: 0.15; 
}

.page-voyance > *, .page-defunt > * { position: relative; z-index: 1; }

.citation-intro {
    font-style: italic;
    color: var(--accent-or);
    font-size: 1.15rem;
    margin-bottom: 2rem;
    border-left: 3px solid var(--accent-or);
    padding-left: 20px;
}

/* ==========================================================================
   5. FORMULAIRES ET BOUTONS
   ========================================================================== */
form { 
  background: var(--bleu-carte); 
  padding: 2.5rem; 
  border-radius: 15px; 
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.05);
}

input, textarea { 
  background: var(--bleu-noir); 
  color: white; 
  border: 1px solid rgba(255,255,255,0.1); 
  border-radius: 6px; 
  padding: 1rem; 
  width: 100%;
  margin-bottom: 1rem;
}

button { 
  background: linear-gradient(135deg, var(--accent-or), #aa8928); 
  color: var(--bleu-noir) !important; 
  border: 0; 
  border-radius: 6px; 
  padding: 1rem 2rem; 
  font-weight: 700; 
  text-transform: uppercase;
  cursor: pointer; 
  transition: 0.3s;
  display: inline-block;
  position: relative;
  overflow: hidden; /* Pour que les étoiles ne sortent pas du bouton */
}

button:hover { 
  filter: brightness(1.2); 
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

/* ==========================================================================
   6. SYSTÈME D'ÉTOILES & ANIMATIONS
   ========================================================================== */
.star {
    position: absolute;
    background: var(--accent-or-clair);
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 10px var(--accent-or);
    z-index: 99;
    animation: fadeOutStar 0.8s linear forwards;
}

@keyframes fadeOutStar {
    0% { transform: scale(1) translateY(0); opacity: 1; }
    100% { transform: scale(0) translateY(-20px); opacity: 0; }
}

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

/* ==========================================================================
   7. RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    .header-wrapper { flex-direction: column; text-align: center; }
    .photo-profil { width: 60px; height: 75px; }
    .nav { justify-content: center; flex-wrap: wrap; gap: 8px; }
    .nav a { font-size: 0.85rem; }
    .site-title { font-size: 1.3rem; }
    
    .img-bureau-penchee, .img-bougie-penchee, .img-bougie-habillage {
        float: none !important;
        display: block;
        margin: 20px auto !important;
        width: 90% !important;
        transform: rotate(5deg) !important;
    }
    
/* Empêche les étoiles de créer un défilement bizarre sur le côté */
    .nav a, .card, button {
        overflow: hidden;
    }
    
    /* On réduit un peu la taille des étoiles pour ne pas cacher le texte sur petit écran */
    .star {
        max-width: 4px;
        max-height: 4px;
    }
}

/* ==========================================================================
   8. CORRECTION TAILLES DES IMAGES
   ========================================================================== */

/* Image de l'œil (Accueil) */
.img-eye-centered {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 12px;
    display: block;
    margin: 0 auto;
    box-shadow: var(--shadow);
}

/* Images inclinées (Voyance & Défunt) */
.img-bureau-penchee, 
.img-bougie-penchee, 
.img-bougie-habillage {
    width: 300px;
    height: auto;
    border: 3px solid white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: 0.3s ease;
}

/* L'image avec texte qui s'enroule autour (Défunt) */
.img-bougie-habillage {
    float: right;
    margin: 10px 0 20px 30px;
}

/* Effet au survol des images */
.img-bureau-penchee:hover, 
.img-bougie-penchee:hover, 
.img-bougie-habillage:hover {
    transform: scale(1.10);
}

/* Correction pour les conteneurs flexibles */
.intro-voyance, .intro-defunt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.texte-intro, .texte-defunt {
    flex: 1;
}

/* Fix Photo "Qui suis-je" */
.img-profil-bio {
    width: 300px; /* Taille identique aux autres photos du site */
    height: auto;
    border-radius: 8px;
    border: 3px solid white;
    box-shadow: var(--shadow);
}

/* ==========================================================================
   9. FIX : QUI SUIS-JE & CENTRAGE ACCUEIL
   ========================================================================== */

/* Fix Centrage Accueil (Réseaux + Bouton) */
.home-center-content {
    display: flex;
    flex-direction: column;   /* Aligne verticalement */
    align-items: center;      /* Centre horizontalement */
    text-align: center;
    gap: 30px;
    margin: 40px auto;
    width: 100%;
}

.social-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.icons-container {
    display: flex;
    justify-content: center;
    gap: 25px;
}

.cta-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* On s'assure que les icônes ont leur taille et couleur */
.icons-container i {
    font-size: 35px;
    color: var(--accent-or);
    transition: 0.4s;
}

.icons-container i:hover {
    transform: scale(1.3) rotate(8deg);
    color: #fff;
}

/* ==========================================================================
   10. FIX ALIGNEMENT TEXTE + PHOTO (QUI SUIS-JE & VOYANCE)
   ========================================================================== */

.intro-voyance, .intro-quisuisje {
    display: flex;             /* Force l'alignement côte à côte */
    align-items: center;       /* Centre verticalement la photo par rapport au texte */
    justify-content: space-between;
    gap: 40px;                 /* Espace entre le texte et la photo */
    margin-bottom: 50px;
    text-align: left;          /* Le texte reste aligné à gauche */
}

.texte-intro, .texte-bio {
    flex: 1;                   /* Le texte prend toute la place disponible à gauche */
}

/* On s'assure que la photo ne rétrécit pas */
.img-profil-bio, .img-bureau-penchee, .img-bougie-penchee {
    flex-shrink: 0; 
}

/* En mode Mobile : on rempile l'un sur l'autre */
@media (max-width: 768px) {
    .intro-voyance, .intro-quisuisje {
        flex-direction: column; /* Texte en haut, photo en bas sur téléphone */
        text-align: center;
    }
}