/* --- CONFIGURATION DES VARIABLES GLOBALES --- */
:root {
    --primary: #1e293b;
    --secondary: #0f172a;
    --accent: #d97706;
    --bg-light: #f8fafc;
    --border: #e2e8f0;
    --text: #334155;
    --text-dark: #0f172a;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: #ffffff;
}

/* ==========================================================================
   SECTION 1 : DESIGN DE LA PAGE D'ACCUEIL / INTRO (index.html)
   ========================================================================== */

.intro-body {
    background-color: #0b0f19; /* Fond sombre de secours premium */
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Image de fond plein écran avec assombrissement pour le contraste */
.fullscreen-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(11, 15, 25, 0.75), rgba(11, 15, 25, 0.85)), url('media/image.png');
    background-size: cover;
    background-position: center;
    z-index: 1;
}

/* Carte centrale d'introduction */
.intro-card {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 30px;
    max-width: 500px;
    width: 100%;
}

/* Animations d'entrée fluides et sobres */
.animated-logo {
    opacity: 0;
    transform: translateY(-15px);
    animation: slideDownFade 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.3s;
}

.intro-subtitle {
    color: #94a3b8;
    font-size: 0.95rem;
    letter-spacing: 1px;
    margin-top: 15px;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeInSimple 1s ease-out forwards;
    animation-delay: 1s;
}

/* Bouton d'entrée interactif */
.btn-enter {
    display: inline-block;
    padding: 14px 32px;
    background-color: transparent;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(15px);
    animation: slideUpFade 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 1.4s;
}

.btn-enter:hover {
    background-color: #ffffff;
    color: var(--secondary);
    border-color: #ffffff;
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   SECTION 2 : DESIGN DU RAPPORT TECHNIQUE (rapport.html)
   ========================================================================== */

.report-body {
    background-color: #ffffff;
    position: relative;
}

/* Filigrane d'arrière-plan très subtil pour le rapport */
.report-watermark-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('media/image.png');
    background-size: cover;
    background-position: center;
    opacity: 0.04; /* Presque invisible pour ne pas gêner la lecture */
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 850px;
    margin: 40px auto;
    padding: 20px 20px 100px 20px;
}

.animate-fade-in {
    opacity: 0;
    animation: fadeInSimple 1s ease-out forwards;
}

.header {
    border-bottom: 2px solid var(--border);
    padding-bottom: 20px;
    margin-bottom: 40px;
}

.logo-container {
    margin-bottom: 25px;
    display: block;
}

.header h1 {
    color: var(--primary);
    font-size: 2.3rem;
    margin: 15px 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
}

.confidential {
    display: inline-block;
    background-color: #ef4444;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.meta {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.5;
}

h2 {
    color: var(--primary);
    font-size: 1.75rem;
    border-left: 4px solid var(--accent);
    padding-left: 12px;
    margin-top: 40px;
    margin-bottom: 20px;
}

h3 {
    color: var(--secondary);
    font-size: 1.3rem;
    margin-top: 25px;
}

p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

ul {
    margin-bottom: 1.5rem;
    padding-left: 20px;
}

li {
    margin-bottom: 0.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 0.9rem;
}

th {
    background-color: var(--primary);
    color: white;
    text-align: left;
    padding: 12px;
    font-weight: 600;
}

td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

tr:nth-child(even) td {
    background-color: var(--bg-light);
}

.blockquote {
    background-color: #fef3c7;
    border-left: 4px solid var(--accent);
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 4px 4px 0;
    font-style: italic;
}

.badge {
    display: inline-block;
    background-color: #e2e8f0;
    color: var(--text-dark);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
}

hr {
    border: 0;
    height: 1px;
    background: var(--border);
    margin: 40px 0;
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-light);
    border-top: 1px solid var(--border);
    padding: 12px 0;
    font-size: 0.8rem;
    color: #64748b;
    text-align: center;
    z-index: 1000;
}

.footer-content {
    max-width: 850px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

/* ==========================================================================
   SECTION 3 : KEYFRAMES ANIMATIONS
   ========================================================================== */

@keyframes fadeInSimple {
    to { opacity: 1; }
}

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

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

/* OPTIMISATION COMPATIBILITÉ IMPRESSION */
@media print {
    body { font-size: 11pt; }
    .container { max-width: 100%; margin: 0; padding: 0; }
    h2 { page-break-before: always; }
    .footer { position: running(footer); font-size: 9pt; }
}
/* ==========================================================================
   AJOUTS : BOUTON RETOUR & LIEN LOGO
   ========================================================================== */

/* Bouton Retour élégant */
.btn-back {
    display: inline-block;
    padding: 10px 24px;
    background-color: transparent;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.15);
}

/* Lien discret vers le logo dans le footer */
.footer-logo-link {
    color: var(--accent); /* Couleur ambre pour attirer l'œil subtilement */
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
    border-bottom: 1px dashed transparent;
}

.footer-logo-link:hover {
    color: #b45309;
    border-bottom-color: #b45309;
}

/* Ajustement pour l'impression (Masquer le bouton retour sur papier) */
@media print {
    .btn-back {
        display: none !important;
    }
}