/* =============================================
   SCANDAL.CSS - Style VERT OPTIMISÉ pour Laurent Zen
   "Parce que la résistance, ça doit être lisible ET belle."
   Version : 2.0 (Nettoyée et structurée)
   ============================================= */

/* ===== RESET ET BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333333;
    background-color: #f0f7f4;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== COULEURS PRINCIPALES ===== */
:root {
    --text-color: #2E5A2E;
    --bg-color: #f0f7f4;
    --header-color: #1B5E20;
    --accent-color: #FFD700;
    --link-color: #006400;
    --border-color: #8BC34A;
    --block-quote-bg: #E8F5E9;
    --table-header-bg: #4CAF50;
    --table-header-color: #FFFFFF;
    --section-bg: #FFFFFF;
}

/* ===== TYPOGRAPHIE ===== */
h1, h2, h3, h4 {
    color: var(--header-color);
    margin-bottom: 15px;
    font-weight: 600;
}

h1 {
    font-size: 2.5em;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 10px;
    margin-top: 20px;
    text-align: center;
}

h2 {
    font-size: 2em;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
}

h3 {
    font-size: 1.5em;
}

h4 {
    font-size: 1.2em;
}

/* ===== LIENS ===== */
a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
}

a:hover {
    text-decoration: underline;
    color: var(--accent-color);
}

/* ===== CITATIONS ===== */
blockquote {
    background-color: var(--block-quote-bg);
    border-left: 5px solid var(--accent-color);
    padding: 15px;
    margin: 20px 0;
    font-style: italic;
    font-weight: 500;
    color: var(--header-color);
}

blockquote footer {
    font-style: normal;
    font-weight: bold;
    color: var(--header-color);
    margin-top: 10px;
}

/* ===== TABLEAUX ===== */
table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    background-color: white;
}

th, td {
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
    word-break: break-word;
    overflow-wrap: break-word;
}

th {
    background-color: var(--table-header-bg);
    color: var(--table-header-color);
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

tr:hover {
    background-color: #e6f7ff;
}

/* ===== RESPONSIVE TABLEAUX (Mobile) ===== */
@media (max-width: 390px) {
    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead {
        display: none;
    }

    tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 10px;
        background-color: white;
    }

    td {
        display: flex;
        justify-content: space-between;
        padding: 8px;
        border-bottom: 1px solid #eee;
    }

    td:before {
        content: attr(data-label);
        font-weight: bold;
        margin-right: 10px;
        color: var(--table-header-bg);
    }
}

/* ===== SECTIONS ===== */
section {
    margin-bottom: 40px;
    padding: 20px;
    background-color: var(--section-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

/* ===== EN-TÊTE ET PIED DE PAGE ===== */
header {
    text-align: center;
    margin-bottom: 40px;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    border-top: 2px solid var(--border-color);
    font-style: italic;
    color: var(--accent-color);
}

/* ===== CLASSES PERSONNALISÉES ===== */
.zen-quote {
    font-style: italic;
    color: var(--header-color);
    border-left: 4px solid var(--accent-color);
    padding-left: 15px;
    margin: 15px 0;
    font-weight: bold;
}

.zen-word {
    font-weight: bold;
    color: var(--link-color);
    font-size: 1.2em;
}

.zen-example {
    background-color: rgba(232, 245, 229, 0.7);
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    font-style: italic;
    border-left: 3px solid var(--accent-color);
}

/* ===== SOUS-TITRE ET DESCRIPTION ===== */
.sous-titre {
    color: #666;
    font-size: 1.2em;
    text-align: center;
    margin-bottom: 10px;
}

.description-accueil {
    text-align: center;
    margin-bottom: 30px;
    color: #555;
}

/* ===== ACCUEIL : GRILLE DES THÈMES ===== */
.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.theme-card {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.theme-card h3 {
    color: var(--header-color);
    margin-top: 0;
}

.theme-card p {
    margin-bottom: 10px;
}

.theme-card a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: bold;
}

/* ===== MENU DÉROULANT EN 2 LIGNES ===== */
#menu-container {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    font-family: Arial, sans-serif;
}

/* Ligne de 4 boutons */
.menu-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

/* Chaque catégorie (bouton + dropdown) */
.menu-category {
    flex: 1;
    min-width: 23%; /* 4 boutons = ~25% - 2% pour les marges */
    margin: 0 1%;
    box-sizing: border-box;
    position: relative; /* Pour positionner le dropdown */
}

/* Boutons principaux */
.menu-category .category-button {
    width: 100%;
    padding: 12px;
    background-color: #4CAF50; /* Vert par défaut */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}

/* Couleurs spécifiques par catégorie (via nth-child) */
.menu-category:nth-child(1) .category-button { background-color: #FFA500; } /* Énergie & Industrie */
.menu-category:nth-child(2) .category-button { background-color: #ff7b00; } /* Défense & Aérospatiale */
.menu-category:nth-child(3) .category-button { background-color: #4CAF50; } /* Agroalimentaire */
.menu-category:nth-child(4) .category-button { background-color: #2196F3; } /* Santé & Pharmacie */
.menu-category:nth-child(5) .category-button { background-color: #9C27B0; } /* Résistance Numérique */
.menu-category:nth-child(6) .category-button { background-color: #FF5722; } /* Infrastructures */
.menu-category:nth-child(7) .category-button { background-color: #673AB7; } /* Autres */
.menu-category:nth-child(8) .category-button { background-color: #27b727; } /* Que Faire ? */

/* Effet au survol */
.menu-category .category-button:hover {
    opacity: 0.9;
}

/* Flèche du bouton */
.menu-category .arrow {
    margin-left: 5px;
    font-size: 12px;
}

/* Dropdowns (menus déroulants) */
.menu-category .submenu {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    border-radius: 5px;
    padding: 10px;
    list-style: none;
    margin: 0;
    left: 0;
    top: 100%;
}

/* Liens dans les dropdowns */
.menu-category .submenu li {
    margin: 5px 0;
}

.menu-category .submenu a {
    color: #333;
    text-decoration: none;
    display: block;
    padding: 8px 12px;
    border-radius: 3px;
    transition: background-color 0.2s, color 0.2s;
}

.menu-category .submenu a:hover {
    background-color: #f0f0f0;
    color: #4CAF50;
}

/* Afficher le dropdown au survol */
.menu-category:hover .submenu {
    display: block;
}

/* ===== RESPONSIVE MENU ===== */
@media (max-width: 768px) {
    .menu-row {
        flex-direction: column;
    }

    .menu-category {
        min-width: 100%;
        margin: 5px 0;
    }
}

/* ===== AUTRES STYLES (Détails, Solutions, etc.) ===== */
.details, .solutions {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.details h2, .solutions h2 {
    color: var(--header-color);
    margin-top: 0;
}

/* ===== CALL TO ACTION ===== */
.call-to-action {
    background-color: #fff8e1;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #ffd54f;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

section {
    animation: fadeIn 0.5s ease-in;
}