/* ============================================================
   PALETTE DE COULEURS ET VARIABLES GLOBALES
   ============================================================ */
:root {
    --color-primary: #1C124A;       /* Indigo Profond */
    --color-primary-dark: #475292;  /* Bleu Indigo */
    --color-secondary: #4D5EB2;     /* Bleu Moyen */
    --color-accent: #71727D;        /* Gris Ardoise */
    --color-light-bg: #F4F7F5;      /* Gris Très Clair Propre */
    --color-text: #333333;
    --color-white: #FFFFFF;
}

/* Base & Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    color: var(--color-text);
    line-height: 1.6;
    background-color: var(--color-light-bg);
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================================
   EN-TÊTE & RECHERCHE
   ============================================================ */
header {
    background-color: var(--color-white);
    padding: 20px 0;
    border-bottom: 1px solid var(--color-accent);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--color-primary);
}

.search-bar {
    display: flex;
}

.search-bar input {
    padding: 8px 12px;
    border: 1px solid var(--color-accent);
    border-radius: 4px 0 0 4px;
    outline: none;
}

.search-bar button {
    padding: 8px 15px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

/* ============================================================
   NAVIGATION & MENU DÉROULANT LANGUES
   ============================================================ */
nav.main-nav {
    background-color: var(--color-primary);
    position: relative;
    z-index: 100;
}

.main-nav ul {
    display: flex;
    list-style: none;
    align-items: center;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    display: block;
    padding: 15px 20px;
    color: var(--color-white);
    font-weight: bold;
    transition: background-color 0.3s;
}

.main-nav a:hover {
    background-color: var(--color-secondary);
}

/* Dropdown Langues */
.dropdown {
    position: relative;
    display: inline-block;
}

.main-nav ul li .dropdown-content {
    display: none !important; 
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--color-primary) !important;
    min-width: 120px;
    z-index: 9999;
    list-style: none;
    padding: 0;
    margin: 0;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.3);
    border-radius: 0 0 4px 4px;
}

.main-nav ul li.dropdown:hover .dropdown-content {
    display: block !important;
}

.dropdown-content li {
    display: block !important;
    width: 100%;
}

.dropdown-content li a {
    padding: 12px 20px !important;
    display: block !important;
    color: var(--color-white) !important;
    font-size: 0.85em;
    background: transparent;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.dropdown-content li a:hover {
    background-color: var(--color-secondary) !important;
}

/* ============================================================
   CONTENU PRINCIPAL ET TITRES
   ============================================================ */
main {
    padding: 40px 0;
    min-height: 500px;
}

.page-title {
    font-size: 28px;
    color: var(--color-primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-primary);
}

.content-section {
    background-color: var(--color-white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.content-section h2 {
    color: var(--color-primary-dark);
    margin-bottom: 15px;
}

.content-section p {
    margin-bottom: 15px;
}

/* ============================================================
   TABLEAU DE DONNÉES & BADGES ECO-RATING
   ============================================================ */
.data-table-container {
    overflow-x: auto;
    background: white;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

thead {
    background: var(--color-primary);
    color: white;
}

th {
    padding: 15px;
    text-align: left;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    font-size: 0.95em;
    vertical-align: middle;
}

tbody tr:hover {
    background-color: #f4f7f5;
}

/* Alignement centré pour les colonnes de notes et piliers */
th:nth-child(3), th:nth-child(4), th:nth-child(5), th:nth-child(6), th:nth-child(7), th:nth-child(8),
td:nth-child(3), td:nth-child(4), td:nth-child(5), td:nth-child(6), td:nth-child(7), td:nth-child(8) {
    text-align: center;
}

.p-letter {
    font-weight: bold;
    color: var(--color-primary);
}

/* BADGES DES 8 PALIERS (Centralisés) */
.rating-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: bold;
    color: white !important;
    min-width: 55px;
    height: 28px;
    font-size: 0.85em;
}

.rating-badge.aaa { background-color: #1b432c !important; }
.rating-badge.aa  { background-color: #275F3E !important; }
.rating-badge.a   { background-color: #44785B !important; }
.rating-badge.bbb { background-color: #6F9D87 !important; }
.rating-badge.bb  { background-color: #8fb8a3 !important; }
.rating-badge.b   { background-color: #b8c99e !important; }
.rating-badge.ccc { background-color: #d4a017 !important; }
.rating-badge.d   { background-color: #a32a2a !important; }

/* ============================================================
   LÉGENDE ET PAGINATION
   ============================================================ */
.pagination-container {
    background: white;
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-page {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    padding: 5px 10px;
    border-radius: 3px;
}

.legend-container {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin: 30px 0;
}

.legend-title {
    font-size: 1.1em;
    color: var(--color-primary);
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase;
}

.legend-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.legend-table td {
    padding: 10px 5px;
    border: none;
    vertical-align: middle;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.legend-item p {
    margin: 0;
    font-size: 0.85em;
    line-height: 1.2;
    color: #333;
}

/* ============================================================
   SECTION SUPPORT / INDÉPENDANCE
   ============================================================ */
.shared-support-section {
    background-color: var(--color-primary);
    padding: 60px 0;
    width: 100%;
    margin-top: 40px;
    border-radius: 8px;
}

.support-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

.support-box {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-secondary);
    padding: 40px;
    border-radius: 8px;
    color: var(--color-white);
}

.support-box h2 {
    color: var(--color-white) !important;
    margin-bottom: 20px;
    font-size: 28px;
}

.support-box p {
    color: #d1d5db;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.btn-support-euro {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--color-secondary);
    color: var(--color-white) !important;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-support-euro:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
}

/* ============================================================
   PIED DE PAGE (FOOTER)
   ============================================================ */
footer {
    background-color: var(--color-primary-dark);
    color: var(--color-white);
    padding: 40px 0 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 30px;
}

.footer-column {
    flex: 1;
    min-width: 200px;
    margin-bottom: 20px;
    padding-right: 20px;
}

.footer-column h3 {
    color: #cbd5e1;
    margin-bottom: 15px;
    font-size: 18px;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 8px;
}

.footer-column a {
    color: #94a3b8;
}

.footer-column a:hover {
    text-decoration: underline;
    color: var(--color-white);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--color-secondary);
    font-size: 14px;
}

/* ============================================================
   ADAPTATION MOBILE (RESPONSIVE)
   ============================================================ */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-bar {
        margin-top: 15px;
        width: 100%;
    }
    
    .main-nav ul {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .footer-content {
        flex-direction: column;
    }

    .legend-table {
        display: block;
    }

    .legend-table tr {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 10px;
    }
}
/* === MOBILE+ 2026-10-25 === */
img, video, iframe { max-width: 100%; height: auto; }
html, body { overflow-x: hidden; }
@media (max-width: 768px) {
    body { font-size: 16px; }
    .container { padding-left: 15px; padding-right: 15px; }
    header { padding-left: 10px; padding-right: 10px; }
    .main-nav ul { width: 100%; padding: 0; margin: 0; }
    .main-nav li, .main-nav a { display: block; width: 100%; padding: 12px 10px; box-sizing: border-box; }
    .dropdown { display: block !important; width: 100%; }
    .dropdown-content { position: static !important; width: 100%; min-width: 0 !important; }
    .dropdown:hover .dropdown-content, .dropdown:focus-within .dropdown-content { display: block !important; }
    table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    input, select, textarea, button { max-width: 100%; font-size: 16px; box-sizing: border-box; }
    .search-bar input { width: 100%; }
    h1 { font-size: 1.6em; }
    h2 { font-size: 1.35em; }
}
@media (max-width: 480px) {
    h1 { font-size: 1.4em; }
    .footer-content { gap: 20px; }
}

/* === TABLEAUX MOBILE 13 v2 2026-10-26 === */
@media (max-width: 768px) {
    /* Tableau des scores : largeur normale, défilement dans son cadre */
    .eco-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table.eco { display: table !important; width: 100% !important; min-width: 760px !important; overflow: visible !important; }
    table.eco th, table.eco td { min-width: 0; white-space: nowrap; }
    /* Tableaux explicatifs (piliers, notes, légende) : encadrés et défilables */
    table:not(.eco):not(.legend-table) {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box;
        background: #fff;
        border: 1px solid #d9dce6;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }
    table:not(.eco):not(.legend-table) th,
    table:not(.eco):not(.legend-table) td { min-width: 120px; font-size: 14px; }
}
