/* --- CONFIGURATION GLOBALE DU SCROLL --- */
html {
    scroll-behavior: smooth; /* Permet le défilement fluide au clic */
}

/* --- INTRO SECTION --- */
.intro-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.intro-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-light);
}

/* --- DATA SHOWCASE & STATS --- */
.data-showcase {
    padding: 2rem 0 6rem 0;
    background: var(--white);
}

/* --- STYLES DES TITRES (H1 Vert et H2 Gris/Souligné) --- */

.main-data-title {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 2.8rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 0.5rem; 
    line-height: 1.2;
    padding: 0 1rem;
}

/* NOUVELLE CLASSE : section-subtitle 
   S'applique à "Au-delà des idées reçues" ET "Importance du photovoltaïque..." */
.section-subtitle {
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #666; /* Gris */
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 2px solid var(--primary-color); /* Ligne verte */
    display: inline-block; /* La ligne s'adapte à la longueur du texte */
    padding-bottom: 10px;
    margin-top: 1rem;
    margin-bottom: 3rem;
    text-align: center;
}

/* On s'assure que les conteneurs centrent bien ces titres inline-block */
.data-showcase .container,
.data-section .container {
    text-align: center;
}


/* --- DATA GRID --- */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    text-align: left; /* Rétablit l'alignement gauche pour le contenu des cartes */
}

.data-card {
    background: var(--light-color);
    padding: 3rem 2rem;
    text-align: center;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.data-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.data-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-family: "Helvetica Neue", Arial, sans-serif;
}

.data-label {
    font-size: 1rem;
    line-height: 1.4;
}

.data-section {
    padding: 6rem 0;
    background: var(--light-color);
}

/* --- SOLAR STATS GRID --- */
.solar-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 2px solid var(--dark-color);
    margin-top: 3rem;
    background: var(--white);
    text-align: center; /* Sécurité pour centrer le contenu */
}

.stat-cell {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-right: 2px solid var(--dark-color);
    border-bottom: 2px solid var(--dark-color);
    min-height: 200px;
}

/* GESTION DES BORDURES DE LA GRILLE */
.stat-cell:nth-child(3n) { 
    border-right: none; 
}
.stat-cell:nth-last-child(-n+2) { 
    border-bottom: none; 
}
.stat-cell:last-child { 
    border-right: none; 
}

.stat-value {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1;
    font-family: "Helvetica Neue", "Oswald", sans-serif;
    text-transform: uppercase;
}

.unit { font-size: 2rem; font-weight: 400; }
.stat-desc { font-size: 1rem; color: var(--text-color); max-width: 200px; }

/* --- STYLE CELLULE FUSIONNÉE (Texte + Graph) --- */
.merged-cell {
    grid-column: span 2; 
    display: flex;
    flex-direction: row; 
    align-items: flex-end; 
    justify-content: space-around;
    gap: 1rem;
    padding-bottom: 0; 
}

.merged-cell .stat-content {
    margin-bottom: 2rem; 
    text-align: left;
    flex: 0 0 auto;
}

.merged-cell .chart-container {
    width: 60%;
    height: 180px; 
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

/* Graphique */
.bar-group { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    height: 100%; 
    justify-content: flex-end; 
    width: 30%; 
    position: relative;
}

.bar { 
    width: 100%; 
    border-radius: 4px 4px 0 0; 
    margin-bottom: 5px;
}

.bar-value { 
    font-size: 0.9rem; 
    font-weight: 700; 
    color: var(--dark-color);
    margin-bottom: 5px;
}

.flag-label {
    font-size: 1.5rem;
    margin-top: 5px;
    margin-bottom: 10px;
}

/* Couleurs des barres */
.germany { background: linear-gradient(to bottom, #000 33%, #D00 33%, #D00 66%, #FC0 66%); }
.spain { background: linear-gradient(to bottom, #AA151B 25%, #F1BF00 25%, #F1BF00 75%, #AA151B 75%); }
.france { 
    background: linear-gradient(to right, #0055A4 33%, #FFF 33%, #FFF 66%, #EF4135 66%); 
    border: 1px solid #ddd; 
}



/* --- ARTICLES PREVIEW CARDS (Style Webdoc) --- */
.articles-preview {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.articles-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.article-card {
    background: #fff;
    width: 100%;
    max-width: 500px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}

.article-img-wrapper {
    height: 260px;
    background-color: #eee;
    position: relative;
    overflow: hidden;
}

.article-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.article-card:hover .article-img-wrapper img {
    transform: scale(1.08);
}

.card-tag {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: #ffffff;
    color: #1a1a1a;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.article-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-content h3 {
    font-size: 1.5rem;
    margin: 0 0 15px 0;
    color: #111;
    font-family: 'Playfair Display', serif;
    line-height: 1.3;
}

.article-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 25px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
}

.article-content p::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
    pointer-events: none;
}

.read-more {
    margin-top: auto;
    font-weight: bold;
    color: #5c7c28;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.2s ease;
}

.article-card:hover .read-more {
    gap: 12px;
    color: #3a5216;
}

/* --- MEDIA QUERIES --- */
@media (max-width: 768px) {
    .solar-stats-grid { grid-template-columns: 1fr; border: none; gap: 1rem; }
    .stat-cell { border: 2px solid var(--dark-color); border-radius: 8px; }
    
    .merged-cell {
        grid-column: span 1;
        flex-direction: column;
        align-items: center;
        gap: 2rem;
        padding-bottom: 2rem;
    }

    .merged-cell .chart-container {
        width: 100%;
    }

    .merged-cell .stat-content {
        text-align: center;
        margin-bottom: 0;
    }
    
    .article-content p {
        -webkit-line-clamp: 4; 
    }
}

/* --- SECTION AUTEURS (Miniatures) --- */
.authors-preview {
    padding: 6rem 0;
    background-color: #ffffff; 
    border-top: 1px solid #eee;
}

.authors-intro {
    text-align: center;
    max-width: 600px;
    margin: -2rem auto 3rem auto; 
    color: var(--text-light);
    font-size: 1.1rem;
    font-style: italic;
}

.authors-mini-grid {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.author-mini-card {
    flex: 1;
    min-width: 300px;
    max-width: 450px;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border: 2px solid transparent; 
    border-radius: 12px;           
    background-clip: padding-box, border-box;
    background-origin: padding-box, border-box;
    background-image: linear-gradient(#fff, #fff), linear-gradient(#eee, #eee);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.author-mini-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
        background-image: linear-gradient(#fff, #fff), linear-gradient(to right, #2e5c46, #7ab596);
}

/* Avatar rond */
.author-avatar {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #f5f5f5;
    transition: border-color 0.3s;
}

.author-mini-card:hover .author-avatar {
    border-color: var(--primary-color);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

/* Infos Auteur */
.author-info {
    display: flex;
    flex-direction: column;
}

.author-info h3 {
    font-family: 'Playfair Display', serif; 
    font-size: 1.3rem;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.author-role {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.author-desc {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.4;
    margin-bottom: 10px;
}

.link-arrow {
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--dark-color);
    margin-top: auto;
    transition: color 0.3s;
}

.author-mini-card:hover .link-arrow {
    color: var(--primary-color);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .author-mini-card {
        flex-direction: column;
        text-align: center;
        padding: 30px;
    }
    
    .author-avatar {
        width: 120px;
        height: 120px;
        margin-bottom: 10px;
    }
}


/* --- INTRO SECTION EVOLUÉE --- */
.intro-section {
    padding: 4rem 0 1rem 0; 
    background: linear-gradient(to bottom, #f9f9f9, var(--white)); 
    text-align: center;
}

.intro-content {
    max-width: 800px;
    margin: 0 auto 4rem auto; 
}

.main-title {
    font-size: 3rem;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    font-family: 'Playfair Display', serif; 
}

.intro-pillars {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
    margin-top: 3rem;
}

.pillar-card {
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    padding: 20px;
}

.pillar-icon {
    width: 70px;
    height: 70px;
    background-color: var(--white);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1.5rem auto;
    font-size: 1.8rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.pillar-card:hover .pillar-icon {
    transform: scale(1.1) rotate(10deg);
    background-color: var(--primary-color);
    color: white;
}

.pillar-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--dark-color);
    font-weight: 700;
}

.pillar-card p {
    font-size: 0.95rem;
    color: #777;
    line-height: 1.5;
}

/* --- FLÈCHE DE SCROLL (Mise à jour) --- */
.scroll-indicator {
    opacity: 0.7;
    margin-top: 2rem;
    display: block; /* Important car c'est maintenant un lien <a> */
    text-decoration: none;
    color: inherit;
    cursor: pointer; /* Le curseur change au survol */
    transition: opacity 0.3s;
}

.scroll-indicator:hover {
    opacity: 1;
}

.scroll-indicator p {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    color: var(--text-color);
}

.bounce {
    animation: bounce 2s infinite;
    color: var(--dark-color);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .main-title { font-size: 2.2rem; }
    .intro-pillars { gap: 2rem; }
    .pillar-card { min-width: 100%; margin-bottom: 1rem; }
}