/* =========================================
   1. CHARGEMENT DES POLICES (Dossier 'sources')
   ========================================= */
@font-face {
    font-family: 'OrpiFont';
    src: url('Orpi-Regular.woff2') format('woff2'),
         url('Orpi-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'OrpiFont';
    src: url('Orpi-Bold.woff2') format('woff2'),
         url('Orpi-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'OrpiFont';
    src: url('Orpi-Medium.woff2') format('woff2'),
         url('Orpi-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'OrpiFont';
    src: url('Orpi-Light.woff2') format('woff2'),
         url('Orpi-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* =========================================
   2. VARIABLES & COULEURS
   ========================================= */
:root {
    --orpi-blue: #285f83;      
    --orpi-red: #D4002D;       
    --orpi-dark: #1e4b68;      
    --text-main: #333333;      
    --text-muted: #666666;     
    --bg-light: #F4F6F8;       
    --white: #FFFFFF;
    --shadow-soft: 0 10px 30px rgba(40, 95, 131, 0.08);
    --shadow-hover: 0 15px 40px rgba(212, 0, 45, 0.15);
    --radius: 12px;
    --container-width: 900px;
}

* { box-sizing: border-box; }

/* =========================================
   3. STRUCTURE GLOBALE (CORRECTION CENTRAGE)
   ========================================= */
body {
    font-family: 'OrpiFont', 'Segoe UI', 'Roboto', Helvetica, Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    font-weight: 400;
    
    /* On force le corps à prendre toute la largeur sans dépasser */
    width: 100%;
    overflow-x: hidden; 
}

/* =========================================
   4. EN-TÊTE
   ========================================= */
header {
    background-color: var(--white);
    padding: 20px 0;
    text-align: center;
    border-bottom: 4px solid var(--orpi-red); 
    width: 100%;
}

.logo-container img {
    height: 55px; 
    width: auto;
    display: block;
    margin: 0 auto;
}

/* =========================================
   5. ZONE PROFIL EXPERT
   ========================================= */
.profile-section {
    background: linear-gradient(135deg, var(--orpi-blue) 0%, var(--orpi-dark) 100%);
    color: var(--white);
    padding: 50px 20px 80px 20px;
    text-align: center;
    position: relative;
    width: 100%;
}

.expert-photo {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 5px solid var(--white);
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    margin-bottom: 20px;
    background-color: var(--white);
}

.expert-name {
    font-family: 'OrpiFont', sans-serif;
    font-weight: 700; 
    font-size: 2.2rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.expert-role {
    font-family: 'OrpiFont', sans-serif;
    font-weight: 300; 
    font-size: 1.1rem;
    color: #e6eff5;
    margin-top: 5px;
}

.agency-badge {
    background-color: var(--orpi-red);
    color: var(--white);
    display: inline-block;
    padding: 8px 25px;
    border-radius: 50px;
    margin-top: 25px;
    font-size: 0.9rem;
    font-weight: 500; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    max-width: 100%; /* Évite que le badge dépasse sur mobile */
}

/* =========================================
   6. CONTENEUR PRINCIPAL (C'est ici que ça se joue)
   ========================================= */
.main-container {
    /* Largeur fixe sécurisée */
    width: 100%; 
    max-width: var(--container-width);
    
    /* CENTRAGE PARFAIT : Marges auto à gauche et droite */
    margin-left: auto;
    margin-right: auto;
    
    /* Marges verticales */
    margin-top: -50px;
    margin-bottom: 50px;
    
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.intro-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    text-align: center;
    margin-bottom: 40px;
    border-top: 5px solid var(--orpi-blue);
}

.intro-card h2 {
    color: var(--orpi-blue);
    font-size: 1.6rem;
    margin-top: 0;
    font-weight: 700; 
}

.intro-text {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 700px;
    margin: 0 auto;
}

/* =========================================
   7. CARTES DE RDV (Réparées)
   ========================================= */
.rdv-grid {
    display: flex;
    flex-wrap: wrap; /* Permet de passer à la ligne sur mobile */
    gap: 25px;
    justify-content: center; /* Centre les cartes horizontalement */
    width: 100%;
}

.rdv-card {
    background: var(--white);
    
    /* Gestion de la largeur des cartes */
    flex: 1 1 300px; /* S'agrandit, se rétrécit, base de 300px */
    max-width: 400px; /* Pour ne pas qu'elles soient trop larges */
    min-width: 280px; /* Pour ne pas qu'elles soient trop fines */
    
    padding: 35px 30px;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid #eef2f5;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.rdv-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-hover);
}

.rdv-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    background-color: var(--orpi-blue); 
}

.icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.rdv-card h3 {
    margin: 10px 0;
    font-size: 1.4rem;
    color: var(--orpi-blue);
    font-weight: 700; 
}

.rdv-info {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    min-height: 50px; 
}

/* =========================================
   8. BOUTONS
   ========================================= */
.btn {
    display: block;
    width: 100%;
    padding: 16px 0;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700; 
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    cursor: pointer;
    background-color: var(--orpi-red);
    border: 2px solid var(--orpi-red);
    color: var(--white);
    letter-spacing: 0.5px; 
}

.btn:hover {
    background-color: #b30026;
    border-color: #b30026;
}

/* =========================================
   9. PIED DE PAGE
   ========================================= */
footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid #e5e5e5;
    margin-top: 40px;
    background-color: var(--white);
    width: 100%;
}

.legal-text {
    font-size: 0.70rem;
    color: #999;
    max-width: 800px;
    margin: 10px auto 0;
    line-height: 1.4;
    font-style: italic;
    font-weight: 300; 
}

/* MOBILE */
@media (max-width: 600px) {
    .expert-name { font-size: 1.6rem; }
    .intro-card { padding: 25px; }
    .main-container { margin-top: -30px; }
}