:root {
    --primary: #154592;
    --primary-hover: #2398ce;
    --secondary: #64748b;
    --accent: #1363a8;
    --danger: #ef4444;







    /* Modifications pour le fond blanc */
    --bg-main: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;

    /* Couleur des traits (Bleu très clair pour ne pas fatiguer l'œil) */
    --grid-blue: rgba(59, 130, 246, 0.1);

    --text-main: #0f172a;
    --text-muted: #475569;
    --border: #e2e8f0;
    --header-bg: rgba(255, 255, 255, 0.95);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05);
}




@keyframes scanLine {
    0% {
        top: -10%;
    }

    100% {
        top: 110%;
    }
}

.card-essai {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    /* Coins moins arrondis pour un look plus industriel */
    padding: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.card-essai:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(21, 69, 146, 0.1);
}

/* Petit coin bleu style "Blueprint" au survol */
.card-essai::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 20px 20px 0;
    border-color: transparent var(--primary) transparent transparent;
    opacity: 0;
    transition: 0.3s;
}

.card-essai:hover::after {
    opacity: 1;
}





















/* Modification du fond pour un effet de profondeur */
body {
    background: radial-gradient(circle at center, #ffffff 0%, #f1f7ff 100%);
}

/* On anime l'opacité du quadrillage pour un effet "radar" */
body::before {
    animation: gridPulse 10s ease-in-out infinite;
}

@keyframes gridPulse {

    0%,
    100% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }
}

/* Reset / général */
body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    /* Fond blanc pur */
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Technical Pattern Overlay */

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Utilisation de la variable bleu clair pour les traits */
    background-image:
        linear-gradient(var(--grid-blue) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-blue) 1px, transparent 1px);
    background-size: 50px 50px;
    /* Taille du quadrillage */
    opacity: 1;
    /* On gère l'opacité directement via la variable rgba */
    pointer-events: none;
    z-index: -1;
}

/* Navbar */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--header-bg);
    position: sticky;
    top: 0;
    z-index: 10;
}

header nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
}

header nav a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: bold;
    transition: color 0.3s;
}

header nav a:hover {
    color: var(--accent);
}

/* HERO SECTION - REFACTORED */
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    background: radial-gradient(circle at center, rgba(13, 32, 77, 0.4) 0%, rgba(15, 23, 42, 0.85) 100%),
        url('./background_pdl.jpg') center center / cover no-repeat;
    color: #1363a8;
}

.hero {
    position: relative;
    padding: 80px 20px;
    margin-bottom: 40px;
    background: transparent;
    /* On garde le quadrillage bleu visible derrière */
    text-align: center;
    border-bottom: 2px solid var(--primary);
    /* Ligne bleue distinctive */
}

/* Overlay léger pour donner du relief sans cacher le fond */
.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Un dégradé très léger du blanc vers le bleu très pâle */
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(59, 130, 246, 0.05) 100%);
    z-index: -1;
}

.hero h1 {
    font-size: 2.5rem;
    color: var(--primary);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 15px;
}

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

.hero-content {
    z-index: 1;
}

/* Texte sur la section d'accueil */
.hero-content {
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.5rem;
}

/* Transition fluide pour toutes les sections */
.section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
    padding: 4rem 2rem;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Cards */
.card {
    background-color: var(--bg-card);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    transition: background-color 0.3s, transform 0.3s;
    margin-top: 1rem;
}

.card:hover {
    background-color: var(--bg-card-hover);
    transform: translateY(-3px);
}

/* Boutons */
.btn {
    padding: 0.8rem 1.5rem;
    background-color: var(--secondary);
    border: none;
    border-radius: 0.3rem;
    color: var(--text-main);
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: var(--accent);
    color: #f3e5e5;
}

/* Sections */
.section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
    padding: 4rem 2rem;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Cards */
.card {
    background-color: var(--bg-card);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    transition: background-color 0.3s, transform 0.3s;
    margin-top: 1rem;
}

.card:hover {
    background-color: var(--bg-card-hover);
    transform: translateY(-3px);
}

/* Boutons */
.btn {
    padding: 0.8rem 1.5rem;
    background-color: var(--secondary);
    border: none;
    border-radius: 0.3rem;
    color: var(--text-main);
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: var(--accent);
    color: #fff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 80px;
    /* For fixed header */
}

h1,
h2,
h3,
h4 {
    line-height: 1.2;
}

.text-primary {
    color: var(--primary);
}

.text-accent {
    color: var(--accent);
}

.text-muted {
    color: var(--text-muted);
}

.text-danger {
    color: var(--danger);
}

.text-secondary {
    color: var(--secondary);
}

.text-center {
    text-align: center;
}

/* LAYOUT */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-4 {
    gap: 1rem;
}

.gap-8 {
    gap: 2rem;
}

.grid {
    display: grid;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media(max-width: 768px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* HEADER & NAVBAR */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: var(--header-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-hover);
}

.logo-container img {
    height: 50px;
}

nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-size: 0.95rem;
}

.nav-link:hover {
    background: var(--bg-card-hover);
    color: var(--primary);
}

.nav-link.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

/* Removed old underline effect */

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* TABS SYSTEM */
.tab-content {
    display: none;
    animation: fadeInTab 0.5s ease-out forwards;
}

.tab-content.active {
    display: block;
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CARDS */
.card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--primary-hover);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* BUTTONS & INPUTS */
.btn {
    background: var(--primary);
    color: var(--bg-card);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 15px var(--primary-hover);
    color: #000;
}

.btn-accent {
    background: var(--accent);
    color: var(--bg-dark);
}

.btn-accent:hover {
    background: #d97706;
    box-shadow: 0 0 15px var(--accent);
}

.btn:disabled {
    background: var(--border);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

select,
input {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-dark);
    color: #000;
    font-family: inherit;
    margin-bottom: 1rem;
    font-weight: 600;
}

select:focus,
input:focus {
    outline: none;
    border-color: var(--primary-hover);
    box-shadow: 0 0 8px rgba(3, 217, 255, 0.5);
}

/* ANIMATIONS & EFFECTS */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.glow-effect:hover {
    box-shadow: 0 0 15px var(--primary-hover);
}

/* Utilities */
.mb-8 {
    margin-bottom: 2rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mt-8 {
    margin-top: 2rem;
}

/* --- Lithology Textures & Styles Corrigés --- */
.litho-layer {
    position: absolute;
    width: 100%;
    left: 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.2);
    /* Pointillé sombre pour mieux voir sur les sols clairs */
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.75rem;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    /* Ombre portée pour la lisibilité */
    overflow: hidden;
}

/* 1. Terre Végétale (Sombre et organique) */
.litho-terre-vegetale {
    background-color: #3d2b1f;
    background-image: radial-gradient(#261a12 1px, transparent 1px);
    background-size: 8px 8px;
}

/* 2. Argile Limoneuse (Ocre/Brun - Aspect Lisse) */
.litho-argile-limoneuse {
    background-color: #A0522D;
    /* Pas de grains, juste de légères marbrures horizontales */
    background-image: linear-gradient(rgba(255, 255, 255, 0.05) 50%, transparent 50%);
    background-size: 100% 10px;
}

/* 3. Sables (Jaune - Texture Grains fins) */
.litho-sables {
    background-color: #F4D03F;
    /* Texture "points" pour simuler les grains de sable */
    background-image: radial-gradient(rgba(0, 0, 0, 0.15) 1px, transparent 1px),
        radial-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px);
    background-size: 4px 4px;
    background-position: 0 0, 2px 2px;
}

/* 4. Limons (Beige/Grisâtre - Texture très fine) */
.litho-limons {
    background-color: #D2B48C;
    background-image: radial-gradient(rgba(0, 0, 0, 0.1) 1px, transparent 1px);
    background-size: 3px 3px;
}

/* 5. Galets / Graves (Gris - Texture gros blocs) */
.litho-graves {
    background-color: #323737;
    /* Cercles irréguliers pour simuler les cailloux */
    background-image: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.2) 4px, transparent 5px),
        radial-gradient(circle at 20% 80%, rgba(0, 0, 0, 0.1) 3px, transparent 4px);
    background-size: 20px 20px;
}

/* 6. Substratum / Roche (Bleu Ardoise - Texture compacte/rayée) */
.litho-substratum {
    background-color: #2C3E50;
    /* Diagonales pour montrer la dureté de la roche */
    background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05) 10px, transparent 10px, transparent 20px);
}

/* 7. Cavité (Noir avec contour Alerte Rouge) */
.litho-cavite {
    background-color: #8f8f8f;
    background-image: repeating-linear-gradient(-45deg, #111, #111 10px, #222 10px, #222 20px);
    border-top: 3px solid #ff0000 !important;
    border-bottom: 3px solid #ff0000 !important;
}

/* Graduation latérale */
.litho-tick {
    position: absolute;
    right: 0;
    width: 12px;
    height: 2px;
    background: #000;
    z-index: 10;
}

.litho-tick-label {
    position: absolute;
    right: 18px;
    font-size: 0.7rem;
    font-weight: bold;
    color: #000;
    background: rgba(255, 255, 255, 0.7);
    /* Petit fond blanc pour lire sur le sol */
    padding: 1px 3px;
    border-radius: 3px;
    transform: translateY(-50%);
    z-index: 10;
}

/* --- Lithology Styles avec Texte Visible --- */
.litho-layer {
    position: absolute;
    width: 100%;
    left: 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.3);
    box-sizing: border-box;

    /* Centrage du texte */
    display: flex !important;
    align-items: center;
    justify-content: center;

    /* Style du texte */
    color: #ffffff !important;
    font-family: 'Arial', sans-serif;
    font-size: 0.85rem !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
    /* Ombre forte pour voir le texte */
    pointer-events: none;
    z-index: 5;
}

/* Tes textures (Gardées identiques) */
.litho-terre-vegetale {
    background-color: #3d2b1f;
    background-image: radial-gradient(#261a12 1px, transparent 1px);
    background-size: 8px 8px;
}

.litho-argile-limoneuse {
    background-color: #A0522D;
    background-image: linear-gradient(rgba(255, 255, 255, 0.05) 50%, transparent 50%);
    background-size: 100% 10px;
}

.litho-sables {
    background-color: #F4D03F;
    background-image: radial-gradient(rgba(0, 0, 0, 0.15) 1px, transparent 1px);
    background-size: 4px 4px;
}

.litho-limons {
    background-color: #D2B48C;
    background-image: radial-gradient(rgba(0, 0, 0, 0.1) 1px, transparent 1px);
    background-size: 3px 3px;
}

.litho-graves {
    background-color: #363c3d;
    background-image: radial-gradient(circle, rgba(0, 0, 0, 0.2) 4px, transparent 5px);
    background-size: 20px 20px;
}

.litho-substratum {
    background-color: #2C3E50;
    background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.05) 0px, rgba(255, 255, 255, 0.05) 10px, transparent 10px, transparent 20px);
}

.litho-cavite {
    background-color: #3c3b3b;
    border-top: 3px solid #ff0000 !important;
    border-bottom: 3px solid #ff0000 !important;
}

/* À coller à la fin de ton fichier style.css */
.simulation-container {
    max-width: 1100px;
    margin: 20px auto;
    /* ... la suite du code CSS ... */
}

/* --- PEDAGOGICAL CALLOUTS --- */
.pedagogical-note {
    background: rgba(59, 130, 246, 0.08);
    border-left: 5px solid var(--primary);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.expert-tip {
    background: rgba(16, 185, 129, 0.08);
    border-left: 5px solid var(--accent);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.pedagogical-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

.pedagogical-note .pedagogical-header {
    color: var(--primary);
}

.expert-tip .pedagogical-header {
    color: var(--accent);
}

/* Next Step Container */
.next-step-container {
    transition: transform 0.3s ease;
}

.next-step-container:hover {
    transform: translateY(-5px);
}

.btn-next {
    background: var(--primary);
    color: white;
    padding: 1.2rem 3rem;
    font-size: 1.1rem;
    border-radius: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
}

#typewriter-text {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    /* Police de code/labo */
    color: var(--primary);
    font-size: 0.5rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    border-right: 3px solid var(--primary);
    /* Le curseur qui clignote */
    padding-right: 5px;
    animation: blink-cursor 0.8s step-end infinite;
}

@keyframes blink-cursor {

    from,
    to {
        border-color: transparent
    }

    50% {
        border-color: var(--primary)
    }
}

.btn-next:hover {
    background: var(--primary-hover);
    transform: translateX(5px);
    box-shadow: 0 20px 25px -5px rgba(59, 130, 246, 0.4);
}

/* --- RAPPORT DE TP STYLES --- */
.report-section {
    border-top: 4px solid var(--primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.report-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.modern-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s ease;
    resize: vertical;
}

.modern-input:focus {
    outline: none;
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(21, 69, 146, 0.1);
}

textarea.modern-input {
    line-height: 1.5;
}

.report-section button {
    height: 3.5rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Specific styling for the PDF preview if needed */
#report-preview {
    background: white;
    padding: 40px;
    color: black;
    font-family: 'Times New Roman', serif; /* Look more academic */
}