/* =========================================
   1. SYSTÈME DE DESIGN PHI & VARIABLES
   ========================================= */
:root {
    --navy-phi: #002147;       /* Bleu Institutionnel Profond */
    --gold-phi: #B89352;       /* Or Vieilli / Sceau */
    --white-paper: #FAFAF9;    /* Blanc Cassé "Papier Droit" */
    --phi: 1.618rem;           /* Le Nombre d'Or pour les marges */
}

/* =========================================
   2. GLOBAL & TEXTURES (AMBIANCE)
   ========================================= */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--white-paper);
    /* Texture "Bruit" très subtile pour l'effet papier de qualité */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: #1a1a1a;
    -webkit-font-smoothing: antialiased; /* Rendu typographique Apple */
}

.main-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
    flex: 1;
}

/* =========================================
   3. HEADER "PALAIS DE JUSTICE"
   ========================================= */
header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px); /* Effet verre dépoli */
    height: 140px; 
    border-bottom: 1px solid rgba(0, 33, 71, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 33, 71, 0.04); /* Ombre "Nuage" */
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-container {
    width: 100%;
    max-width: 1400px;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Gauche / Centre / Droite */
}

/* --- Gauche : Signature Marque --- */
.header-side {
    width: 200px; /* Largeur fixe pour l'équilibre */
    display: flex;
    align-items: center;
}

.brand-signature {
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    border-left: 3px solid var(--gold-phi);
    padding-left: 12px;
}
.brand-signature:hover { opacity: 1; }

.zuzen-small {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--navy-phi);
    letter-spacing: 1px;
}
.fr-small {
    font-family: 'Cinzel', serif;
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--gold-phi);
}

/* --- Centre : Autorité Institutionnelle --- */
.authority-block {
    display: flex;
    align-items: center;
    gap: 2rem;
    text-align: left;
}
.authority-icon {
    height: 105px; /* Protagonisme de l'image */
    width: auto;
    filter: drop-shadow(0 5px 15px rgba(184, 147, 82, 0.2));
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.authority-block:hover .authority-icon { transform: scale(1.02); }

.authority-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.main-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--navy-phi);
    margin: 0;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.sub-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 400;
    font-style: italic;
    color: var(--navy-phi);
    margin: 2px 0 8px 0;
    opacity: 0.85;
}

.separator-phi {
    width: 60px;
    height: 2px;
    background: var(--gold-phi);
    margin-bottom: 8px;
}

.official-source {
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--gold-phi);
    margin: 0;
    letter-spacing: 2px;
    font-weight: 600;
}

/* --- Droite : Équilibre (Vide) --- */
.placeholder-right {
    width: 200px;
}

/* --- Responsive Header --- */
@media (max-width: 1000px) {
    header { height: auto; padding: 20px 0; }
    .header-container { flex-direction: column; gap: 20px; }
    .header-side { width: auto; justify-content: center; }
    .brand-signature { border-left: none; border-bottom: 2px solid var(--gold-phi); padding-left: 0; padding-bottom: 5px; }
    .placeholder-right { display: none; }
    .authority-block { flex-direction: column; text-align: center; gap: 15px; }
    .separator-phi { margin: 8px auto; }
    .authority-icon { height: 80px; }
    .main-title { font-size: 1.4rem; }
    .sub-title { font-size: 1.1rem; }
}

/* =========================================
   4. CARTE DE RECHERCHE "LÉVITATION"
   ========================================= */
.search-card {
    background: #FFFFFF;
    padding: 3.5rem 3rem;
    /* Ombre diffuse et profonde pour l'effet flottant */
    box-shadow: 0 20px 60px rgba(0, 33, 71, 0.06), 0 1px 3px rgba(0,0,0,0.05);
    max-width: 800px;
    width: 90%;
    margin: 3rem auto;
    text-align: center;
    border-radius: 8px;
    position: relative;
    border-top: 3px solid var(--gold-phi); /* La touche de luxe discrète */
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.search-card:hover {
    transform: translateY(-3px); /* Lévitation au survol */
    box-shadow: 0 30px 70px rgba(0, 33, 71, 0.09);
}

@media (max-width: 600px) { 
    .search-card { padding: 2rem 1.5rem; margin: 2rem auto; width: 95%; } 
}

.hero-text {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 2.8rem;
    color: var(--navy-phi);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}
@media (max-width: 768px) { .hero-text { font-size: 2rem; } }

/* =========================================
   5. INPUT & BOUTONS "TACTILES"
   ========================================= */

/* Champ de saisie avec animation dorée */
.input-phi {
    width: 100%; 
    border: none; 
    border-bottom: 1px solid #E0E0E0; 
    padding: 1.2rem 0;
    font-family: 'Inter', sans-serif;
    font-size: 1.3rem;
    outline: none; 
    margin-bottom: 2.5rem; 
    text-align: center;
    background: transparent; 
    color: var(--navy-phi);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    /* Préparation de l'animation de la ligne */
    background-image: linear-gradient(to right, var(--gold-phi), var(--gold-phi));
    background-size: 0% 2px;
    background-repeat: no-repeat;
    background-position: bottom center;
}

.input-phi:focus { 
    background-size: 100% 2px; /* La ligne s'étend */
    border-bottom-color: transparent;
}
.input-phi::placeholder {
    color: #888; /* Un gris un peu plus soutenu (au lieu de #AAA) */
    font-weight: 400; /* Un peu plus de graisse */
    font-style: italic;
    opacity: 0.8;
}

/* --- BOUTON PREMIUM (Mise à jour avec le retour de l'Or) --- */
.btn-premium {
    background: linear-gradient(135deg, var(--navy-phi) 0%, #001a38 100%);
    color: white; 
    border: none; 
    padding: 1.2rem 3rem;
    font-weight: 500; 
    letter-spacing: 0.5px;
    cursor: pointer; 
    font-size: 1.1rem;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 33, 71, 0.25);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); /* Transition un peu plus lente pour l'élégance */
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 33, 71, 0.2);
    width: 100%;
}

.btn-premium:hover { 
    transform: translateY(-2px);
    /* LE RETOUR DE L'OR : Un dégradé doré riche */
    background: linear-gradient(135deg, #C6A664 0%, #B89352 100%);
    box-shadow: 0 8px 30px rgba(184, 147, 82, 0.4); /* L'ombre devient dorée aussi */
}

.btn-premium:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(0, 33, 71, 0.2);
}

/* --- ANIMATION TEXTE SUGGESTION (RESPONSIVE) --- */
.suggestion-text {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    color: #666; /* Gris assez foncé pour être lisible sans être noir */
    
    /* Responsive Font Size */
    font-size: 1.1rem;
    line-height: 1.5;
    
    margin-top: 1rem;
    
    /* STABILITÉ DU LAYOUT (Empêche la page de sauter quand le texte change) */
    min-height: 80px; 
    display: flex;
    align-items: center;     /* Centre verticalement */
    justify-content: center; /* Centre horizontalement */
    
    /* L'animation de transition */
    transition: opacity 0.8s ease-in-out, transform 0.8s ease;
    opacity: 1;
    transform: translateY(0);
}

/* Version Mobile : Texte un peu plus petit pour ne pas prendre tout l'écran */
@media (max-width: 600px) {
    .suggestion-text {
        font-size: 0.95rem; /* Plus petit sur mobile pour tout afficher */
        min-height: 100px;  /* Un peu plus haut car le texte fera plus de lignes */
        padding: 0 5px;
    }
}

/* Classe utilitaire pour cacher le texte pendant la transition */
.suggestion-hidden {
    opacity: 0;
    transform: translateY(5px); /* Petit mouvement vers le bas subtil */
}

/* =========================================
   6. RÉSULTATS & DÉTAILS
   ========================================= */
.query-wrapper { 
    margin-bottom: 2rem; 
    padding-bottom: 1.5rem; 
    border-bottom: 1px solid #E5E5E5; 
}
.query-label { 
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px; color: #AAA; 
    display: block; margin-bottom: 0.5rem; 
}
/* --- MODIFICATION : TEXTE DE RECHERCHE PLUS DISCRET --- */
.query-context { 
    font-family: 'Playfair Display', serif; 
    font-style: italic; 
    font-size: 1.15rem; /* Légèrement plus petit (c'était 1.3) */
    color: #525f7f;     /* GRIS ARDOISE au lieu du Bleu Marine agressif */
    font-weight: 400;   /* Plus fin */
    border-left: 3px solid var(--gold-phi); /* On garde la ligne d'or pour la marque */
    padding-left: 1.2rem; 
    line-height: 1.5;   /* Meilleure respiration */
    opacity: 0.9;
}

/* Carte Expert */
details { 
    margin-bottom: 1.2rem; 
    background: white; 
    border: 1px solid #EAEAEA; 
    transition: all 0.3s ease; 
    border-radius: 6px; 
}
details:hover { 
    border-color: var(--gold-phi); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.06); 
    transform: translateY(-1px);
}
summary { 
    padding: 1.8rem; cursor: pointer; display: flex; justify-content: space-between; 
    align-items: center; list-style: none; outline: none; 
}
@media (max-width: 600px) { summary { flex-direction: column; align-items: flex-start; gap: 15px; } }

.expert-name { 
    font-family: 'Playfair Display', serif; font-size: 1.4rem; color: var(--navy-phi); margin: 0; font-weight: 700;
}
.expert-loc { 
    color: var(--gold-phi); font-weight: 600; font-size: 0.75rem; 
    text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 6px; display: block;
}

.bac-badge { 
    font-weight: 600; font-size: 0.75rem; padding: 6px 14px; 
    background: var(--white-paper); border: 1px solid #DDD; 
    color: var(--navy-phi); border-radius: 4px; 
}
.bac-badge.gold-badge { 
    border-color: var(--gold-phi); color: var(--gold-phi); 
    background: rgba(184, 147, 82, 0.08); 
}

.details-grid { 
    padding: 2.5rem; display: grid; grid-template-columns: 1fr 1.618fr; gap: 3rem; 
    background: #FCFCFC; border-top: 1px solid #EEE; 
}
@media (max-width: 768px) { .details-grid { grid-template-columns: 1fr; gap: 1.5rem; } }

.contact-link { 
    color: var(--navy-phi); text-decoration: none; font-weight: 500; 
    display: block; margin-bottom: 1rem; padding: 0.5rem 0;
    border-bottom: 1px dashed #EEE; transition: 0.2s;
}
.contact-link:hover { color: var(--gold-phi); border-bottom-color: var(--gold-phi); }

.section-title { 
    font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.5px; 
    color: #999; margin-bottom: 1.2rem; 
}
.spec-list { list-style: none; padding: 0; margin: 0; font-size: 0.9rem; line-height: 1.6; }
.spec-list li { 
    margin-bottom: 0.8rem; padding-left: 15px; 
    border-left: 2px solid var(--gold-phi); color: #444; 
}

/* =========================================
   7. FOOTER "SOCLE DE JUSTICE" (V2)
   ========================================= */
footer {
    background: var(--navy-phi);
    color: white;
    padding-top: 4rem;
    margin-top: auto;
    position: relative;
    font-size: 0.9rem;
}

/* La ligne dorée supérieure */
footer::before {
    content: ''; 
    position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--navy-phi) 0%, var(--gold-phi) 50%, var(--navy-phi) 100%);
}

.footer-grid {
    max-width: 1000px; 
    margin: 0 auto; 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 3rem;
    padding-bottom: 4rem; /* Plus d'espace avant le socle final */
    padding-left: 2rem; 
    padding-right: 2rem;
}

.footer-col h5 { 
    color: var(--gold-phi); 
    text-transform: uppercase; 
    font-size: 0.75rem; 
    letter-spacing: 2px; 
    margin-bottom: 1.5rem; 
    font-weight: 600;
    opacity: 0.8; /* Un peu plus discret pour ne pas voler la vedette */
}

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.8rem; }

.footer-links a { 
    color: #B0B8C1; 
    text-decoration: none; 
    transition: all 0.3s ease;
    display: inline-block;
}
.footer-links a:hover { color: white; transform: translateX(3px); }

/* --- CORRECTION EMAIL (Sobre & Élégant) --- */
.footer-address { color: #B0B8C1; line-height: 1.6; }

.footer-email {
    color: white;
    /* RETOUR À LA POLICE NORMALE */
    font-family: 'Inter', sans-serif; 
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    /* SOULIGNEMENT SUBTIL */
    border-bottom: 1px solid rgba(184, 147, 82, 0.4); /* Doré transparent */
    padding-bottom: 1px;
    transition: all 0.3s ease;
}
.footer-email:hover {
    color: var(--gold-phi);
    border-bottom-color: var(--gold-phi); /* Doré solide au survol */
}

/* --- LE SOCLE DU BAS (CORRECTION EQUILIBRE) --- */
.footer-bottom {
    background-color: #001a38;
    padding: 2rem 1rem;
    /* CENTRALISATION TOTALE */
    display: flex;
    flex-direction: column; /* Empilement vertical */
    align-items: center;    /* Centrage horizontal */
    gap: 0.8rem;            /* Espace entre le Copyright et Iturtek */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
    color: #6c7c8c;
    text-align: center;
}

.copyright-text {
    opacity: 0.8;
}

.copyright-text strong {
    color: white;
    letter-spacing: 0.5px;
}

/* Signature ITURTEK discrète mais présente */
.iturtek-signature {
    font-size: 0.75rem;
    opacity: 0.6;
    transition: opacity 0.3s;
}
.iturtek-signature:hover { opacity: 1; }

.iturtek-signature a {
    color: #8fa1b3;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px dotted #8fa1b3;
    transition: 0.3s;
}
.iturtek-signature a:hover {
    color: var(--gold-phi);
    border-bottom-color: var(--gold-phi);
}

/* Responsive */
@media (max-width: 800px) { 
    .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 2rem; } 
}

/* =========================================
   8. LOADER (NOUVELLE VERSION ZUZEN)
   ========================================= */
.loader-overlay {
    display: none; /* Caché par défaut */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.96); /* Fond très blanc et propre */
    backdrop-filter: blur(5px);
    z-index: 99999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Playfair Display', serif;
}

/* Zone centrale contenant le cercle et le logo */
.loader-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

/* L'anneau doré qui tourne */
.spinning-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--gold-phi); /* Utilisation de ta variable Or */
    border-right-color: rgba(184, 147, 82, 0.3); /* Traînée dorée légère */
    animation: spin 1s linear infinite;
}

/* Le Logo Marianne au centre */
.zuzen-logo-center {
    width: 115px; /* Calculé pour laisser de l'air avec l'anneau */
    height: 115px;
    border-radius: 50%;
    object-fit: cover;
    animation: breathe 3s ease-in-out infinite;
    box-shadow: 0 10px 25px rgba(0, 33, 71, 0.10);
}

/* Le texte "Analyse..." */
.loader-text {
    color: var(--navy-phi);
    font-size: 1.5rem;
    font-style: italic;
    font-weight: 600;
    letter-spacing: 0.5px;
    animation: fadeInOut 2s ease-in-out infinite;
    margin-top: 0; /* Reset */
}

/* Footer discret "ZUZEN" dans le loader */
.zuzen-footer-loader {
    position: absolute;
    bottom: 30px;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: #8898AA;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* --- ANIMATIONS --- */
@keyframes spin { 
    0% { transform: rotate(0deg); } 
    100% { transform: rotate(360deg); } 
}

@keyframes breathe { 
    0% { transform: scale(0.96); opacity: 0.9; } 
    50% { transform: scale(1.0); opacity: 1; } 
    100% { transform: scale(0.96); opacity: 0.9; } 
}

@keyframes fadeInOut { 
    0% { opacity: 0.7; } 
    50% { opacity: 1; } 
    100% { opacity: 0.7; } 
}