/* --- IMPORTATION DES POLICES --- */
@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:wght@600;700&family=Inter:wght@300;400;600&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

/* --- AJOUT DES MARGES : DEFINITION DU CONTAINER --- */
.container {
    max-width: 1200px; /* Limite la largeur pour créer les marges à gauche et à droite */
    margin: 0 auto;    /* Centre tout le bloc au milieu de l'écran */
    padding: 0 20px;   /* Sécurité pour ne pas toucher les bords sur mobile */
}

body {
    background-color: #f4f7f9;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%230056b3' fill-opacity='0.05'%3E%3Cpath opacity='.5' d='M96 95V4L10 66l86 29zm-7 0l-67-23 67-23V95zM10 54L96 4 10 24v30zm7 0l67-23-67-23v46zm0 0L46 40 10 54zM0 100L80 0H0v100zm8-8l64-80H8v80zM0 0l100 100V0H0zm92 8L8 92h84V8z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    min-height: 100vh;
    color: #333;
    font-family: 'Inter', sans-serif;
}

/* --- EN-TÊTE (STYLE ORIGINAL) --- */
.professor-header {
    background: linear-gradient(135deg, #004488 0%, #002d5f 100%);
    color: white; padding: 40px 50px; border-radius: 20px;
    margin-bottom: 40px; box-shadow: 0 15px 35px rgba(0, 45, 95, 0.3);
    display: flex; align-items: center; justify-content: space-between;
}
.header-photo, .header-logo {
    width: 210px; height: 210px; border-radius: 50%;
    border: 6px solid rgba(255, 255, 255, 0.2);
    background: white; display: flex; 
    align-items: center; justify-content: center; flex-shrink: 0;
}
.header-photo img { width: auto; height: 100%; max-width: 100%; object-fit: contain; }
.header-logo img { width: 85%; height: auto; object-fit: contain; }
.header-content { flex: 1; text-align: center; padding: 0 30px; }
.professor-name { font-size: 3.2em; font-weight: 700; font-family: 'Crimson Pro', serif; }
.institution-badge { background: rgba(255, 255, 255, 0.1); padding: 12px 30px; border-radius: 50px; display: inline-block; border: 1px solid rgba(255, 255, 255, 0.2); margin-top: 10px;}
.faculty-highlight { color: #ffcc00; font-weight: 700; }

/* --- NAVIGATION (STYLE ORIGINAL) --- */
.academic-nav { display: flex; justify-content: center; gap: 20px; margin: 40px 0; flex-wrap: wrap; }
.nav-card {
    background: white; color: #0056b3; padding: 15px 30px; border-radius: 12px;
    font-weight: 600; border: 2px solid #0056b3; min-width: 180px; text-align: center; transition: 0.3s;
    text-decoration: none;
}
.nav-card:hover { background: #0056b3; color: white; transform: translateY(-5px); }
.nav-card.active { background: #0056b3; color: white; }

/* --- CARTES ET PRÉSENTATION (STYLE ORIGINAL) --- */
.presentation, .resource-card {
    background: white; padding: 40px; border-radius: 15px; margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}
.presentation { border-left: 8px solid #0056b3; }
.resources-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 30px; }
.resource-list { list-style: none; margin: 20px 0; }
.resource-list li { padding: 10px 0 10px 30px; border-bottom: 1px solid #eee; position: relative; }
.resource-list li::before { content: '→'; position: absolute; left: 0; color: #0056b3; font-weight: bold; }

/* --- RECHERCHE --- */
.search-container { max-width: 800px; margin: 0 auto 30px auto; position: relative; z-index: 10; }
.search-bar { width: 100%; padding: 18px 25px; border-radius: 35px; border: 2px solid #0056b3; outline: none; font-size: 1.1em; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
#searchResultsBox { display: none; position: absolute; z-index: 9999; width: 100%; background-color: #ffffff !important; padding: 20px; border-radius: 15px; border: 2px solid #0056b3; margin-top: 15px; margin-bottom: 30px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
#linksContainer { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 10px; }
.search-link { display: flex; align-items: center; justify-content: center; color: #0056b3; font-weight: 600; background: #f0f7ff; padding: 14px; border-radius: 10px; text-decoration: none; border: 1px solid #d0e4ff; transition: 0.3s; text-align: center; }
.search-link:hover { background: #0056b3; color: white; transform: translateY(-2px); }

/* --- FOOTER --- */
.professor-footer { background: #002d5f; color: white; padding: 50px 40px; margin-top: 60px; border-radius: 20px; text-align: center; }
.contact-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; margin: 30px 0; }
.contact-item { background: rgba(255, 255, 255, 0.1); padding: 20px; border-radius: 10px; }
.contact-item h4 { color: #ffc107; margin-bottom: 10px; }
.footer-links { display: flex; justify-content: center; gap: 40px; margin: 30px 0; flex-wrap: wrap; }
.signature { margin-top: 30px; font-style: italic; opacity: 0.8; border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 20px; }
#backToTop { display: none; position: fixed; bottom: 30px; right: 30px; background: #0056b3; color: white; border: none; padding: 15px; border-radius: 50%; cursor: pointer; z-index: 1000; }

/* ============================================================
   CORRECTION DES LIGNES (TOUCHE UNIQUEMENT AUX TITRES DES CARTES)
   ============================================================ */

/* Règle globale pour forcer une seule ligne de la couleur du mot */
.resource-card h3 {
    border-bottom: 3px solid currentColor !important; /* Ligne = Couleur du mot */
    background: none !important;
    -webkit-text-fill-color: initial !important;
    display: inline-block !important;
    padding-bottom: 5px !important;
    text-decoration: none !important;
    position: relative !important;
}

/* On supprime les "doubles lignes" (::after) pour les 3 premières cartes */
.resource-card h3::after, .resource-card h3::before {
    display: none !important;
    content: none !important;
}

/* On conserve les couleurs d'icônes et de textes spécifiques pour les 3 premières */
.resource-card:nth-child(1) i, .resource-card:nth-child(1) h3 { color: #6a11cb !important; font-size: 1.4em; }
.resource-card:nth-child(2) i, .resource-card:nth-child(2) h3 { color: #2575fc !important; font-size: 1.4em; }
.resource-card:nth-child(3) i, .resource-card:nth-child(3) h3 { color: #00b09b !important; font-size: 1.4em; }

/* Taille des icônes pour les 3 premiers */
.resource-card:nth-child(1) i, .resource-card:nth-child(2) i, .resource-card:nth-child(3) i {
    font-size: 2.8rem !important; display: block !important; margin-bottom: 10px !important;
}

/* ============================================================
   FIN DE LA CORRECTION - LE RESTE DEMEURE INCHANGÉ
   ============================================================ */

[data-aos] { overflow: visible !important; }

/* --- PHOTO ET LOGO --- */
.header-photo {
    overflow: hidden !important;
    border-radius: 12px !important; 
    border: 3px solid white !important; 
    width: 140px !important;
    height: 170px !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3) !important;
    background: #f0f0f0 !important;
}
.header-photo img { width: 100% !important; height: 100% !important; object-fit: cover !important; display: block !important; }

.professor-header .header-logo {
    width: 140px !important;  
    height: 175px !important; 
    background: white !important;
    border: 2px solid white !important; 
    border-radius: 12px !important;    
    box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important; 
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px !important;
    overflow: hidden !important;
}
.professor-header .header-logo img { width: 100% !important; height: auto !important; max-height: 90% !important; object-fit: contain !important; border: none !important; }
