/* ==========================================================================
 *  1. STRUCTURE DU MENU & VARIABLES (ONCONUX.NET)
 *  ========================================================================== */
:root {
    --primary-color: #1e293b;    /* Bleu ardoise foncé moderne */
    --accent-color: #1d4ed8;     /* Bleu royal pour les liens actifs/titres */
    --text-light: #ffffff;
    --text-dark: #000000;
    --bg-light: #f8fafc;
    --transition-speed: 0.25s;
}

/* Barre de navigation */
.nav-onconux {
    background-color: var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    font-family: Arial, Helvetica, sans-serif;
}

.nav-container {
    max-width: 1000px; /* Aligné sur le <main> de votre index */
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

/* Logo */
.nav-logo a {
    color: var(--text-light);
    font-size: 1.3rem;
    font-weight: bold;
    text-decoration: none;
    padding: 15px 0;
    display: inline-block;
}

/* Liste des liens (Desktop) */
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    color: var(--text-light);
    text-decoration: none;
    padding: 18px 15px;
    font-size: 0.95rem;
    font-weight: bold;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.nav-link:hover,
.nav-item.active .nav-link {
    background-color: rgba(255, 255, 255, 0.1);
    color: #60a5fa; /* Bleu plus clair pour le contraste sur fond sombre */
}

/* Bouton Hamburger Mobile */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 19px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-toggle .bar {
    height: 3px;
    width: 100%;
    background-color: var(--text-light);
    border-radius: 3px;
    transition: var(--transition-speed);
}

/* ==========================================================================
 *  2. CLASSES DE MISE EN PAGE ET OUTILS (DEPUIS INDEX2.PHP)
 *  ========================================================================== */

/* Grille des outils de calcul */
.grid-tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.card-tool {
    background: #f1f5f9;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    text-decoration: none;
    color: #000;
    transition: background var(--transition-speed);
}

.card-tool:hover {
    background: #e2e8f0;
}

.card-tool h4 {
    color: var(--accent-color);
    font-size: 1.05rem;
    margin-bottom: 5px;
    font-weight: bold;
}

.card-tool p {
    margin: 0;
    font-size: 0.85rem;
    color: #334155;
}

/* Tableaux techniques */
.tech-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.95rem;
}

.tech-table th, .tech-table td {
    border: 1px solid #cbd5e1;
    padding: 10px;
    text-align: center;
}

.tech-table th {
    background: #f1f5f9;
    font-weight: bold;
}

.tech-table tr:nth-child(even) {
    background: #f8fafc;
}

/* Blocs spécifiques (Formules, Exemples, Alertes) */
.formula-box {
    background: #f8fafc;
    border: 1px dashed #64748b;
    padding: 15px;
    margin: 15px 0;
    font-family: monospace;
    font-size: 1rem;
    color: #000;
}

.example-box {
    background: #f1f5f9;
    border-left: 4px solid #64748b;
    padding: 15px;
    margin: 15px 0;
    font-size: 0.95rem;
}

.alert-box {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

/* Conteneurs images */
.img-container {
    text-align: center;
    margin: 20px 0;
}

.img-container img {
    max-width: 100%;
    height: auto;
}

.img-caption {
    display: block;
    font-size: 0.85rem;
    color: #475569;
    margin-top: 5px;
    font-style: italic;
}

/* Divers */
.disclaimer {
    border: 1px solid #000;
    padding: 15px;
    margin-top: 30px;
    font-size: 0.9rem;
    background: #fafafa;
}

.donate-box {
    text-align: center;
    margin: 30px 0;
}

/* ==========================================================================
 *  3. COMPATIBILITÉ MOBILE (RESPONSIVE)
 *  ========================================================================== */
@media screen and (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        flex-direction: column;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition-speed) ease-in-out;
        box-shadow: 0 4px 5px rgba(0,0,0,0.1);
    }

    .nav-menu.open {
        max-height: 300px; /* Ajuster selon le nombre de liens */
    }

    .nav-item {
        width: 100%;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-link {
        padding: 15px 20px;
        width: 100%;
        box-sizing: border-box;
    }

    /* Animation bouton X */
    .menu-toggle.open .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.open .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.open .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    /* Ajustement des tableaux sur mobile pour éviter le scroll horizontal violent */
    .tech-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
