@import url('https://fonts.googleapis.com/css2?family=VT323&family=Inter:wght@400;600;700&display=swap');

:root {
    --nav-bg: #265c69; /* Bleu sarcelle foncé du haut */
    --bg-main: #eef4f7; /* Fond clair froid */
    --card-bg: #e2e8ea; /* Gris clair pour les cartes */
    --card-border: #8aa3ab; /* Bordure des éléments */
    --text-dark: #1f2937;
    --text-nav: #ffffff;
    --btn-blue: #70cbf4; /* Boutons pixels bleus */
    --btn-dark: #1b5866; /* Bouton envoyer foncé */
    --form-bg: #9baab0; /* Formulaire métallique */
    --input-bg: #cde4eb;
    --input-grid: #a8cdd8;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-dark);
    /* Motif hexagonal subtil en fond pour l'effet scientifique */
    background-image: 
        linear-gradient(to right, rgba(138, 163, 171, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(138, 163, 171, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === Navbar === */
.navbar {
    background-color: var(--nav-bg);
    color: var(--text-nav);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 3rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.logo {
    font-family: 'VT323', monospace;
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: 2px;
}

.logo i { 
    font-size: 1.8rem; 
    /* Effet contour Pixel Art (Shadow box) */
    filter: drop-shadow(1px 1px 0px rgba(0,0,0,0.5));
}

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

.navbar a {
    color: var(--text-nav);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
}
.navbar a:hover { 
    color: var(--btn-blue); 
}

/* === Structure Principale === */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    width: 100%;
}

.hero-section {
    text-align: center;
    margin-bottom: 4rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.hero-section p {
    font-size: 1.1rem;
    color: #4b5563;
}

.content-wrapper {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}

/* === Section Redirections (Gauche) === */
.redirections-section {
    flex: 2;
    min-width: 300px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Cartes Labo */
.lab-card {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 4px 4px 0 rgba(138, 163, 171, 0.4); /* Ombre solide type pixel */
    display: flex;
    flex-direction: column;
    position: relative;
    /* Grille de fond pour le style carnet de labo */
    background-image: 
        linear-gradient(to right, rgba(255,255,255,0.4) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.4) 1px, transparent 1px);
    background-size: 15px 15px;
}

.card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-header i {
    font-size: 2rem;
    color: var(--nav-bg);
}

.title-area h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
}

.title-area .link {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #1e40af;
    font-weight: 600;
}

.lab-card > p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    color: #374151;
    flex-grow: 1;
}

.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

/* Boutons Pixel Art */
.btn-pixel {
    background: var(--btn-blue);
    color: #000;
    border: 2px solid #000;
    padding: 0.4rem 1.2rem;
    font-weight: 700;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.15); /* Ombre portée nette */
    border-radius: 4px;
    transition: transform 0.1s, box-shadow 0.1s;
}

.btn-pixel:active {
    transform: translate(3px, 3px);
    box-shadow: 0 0 0 rgba(0,0,0,0.15);
}

/* Eprouvette (Test Tube) CSS */
.test-tube {
    width: 22px;
    height: 55px;
    border: 2px solid #475569;
    border-top: none;
    border-radius: 0 0 12px 12px;
    position: relative;
    background: rgba(255,255,255,0.6);
}

.test-tube::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -4px;
    right: -4px;
    height: 4px;
    background: #475569;
    border-radius: 2px;
}

.liquid {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: #38bdf8;
    border-radius: 0 0 8px 8px;
    border-top: 2px solid #0284c7;
}

/* === Section Contact (Droite) === */
.contact-section {
    flex: 1;
    min-width: 320px;
}

.contact-card {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 8px;
    padding: 1.2rem;
    box-shadow: 4px 4px 0 rgba(138, 163, 171, 0.4);
    margin-bottom: 2rem;
    background-image: 
        linear-gradient(to right, rgba(255,255,255,0.4) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.4) 1px, transparent 1px);
    background-size: 15px 15px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 1rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--nav-bg);
    margin-top: 2px;
}

.contact-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #111827;
}

.contact-item a {
    color: #1e40af;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
}

/* === Formulaire Style Panneau Laboratoire === */
.pixel-form {
    background: var(--form-bg);
    padding: 1.5rem;
    border: 4px inset #cbd5e1; /* Effet enfoncé (inset) */
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.1);
}

.pixel-form input, .pixel-form textarea {
    width: 100%;
    background: var(--input-bg);
    border: 2px solid #5a757e;
    border-radius: 4px;
    padding: 0.8rem;
    font-family: 'VT323', monospace;
    font-size: 1.3rem;
    color: #1e3a8a;
    /* Grille de type radar/cahier scientifique pour les inputs */
    background-image: 
        linear-gradient(to right, var(--input-grid) 1px, transparent 1px),
        linear-gradient(to bottom, var(--input-grid) 1px, transparent 1px);
    background-size: 12px 12px;
    box-shadow: inset 2px 2px 5px rgba(0,0,0,0.1);
}

.pixel-form textarea {
    height: 120px;
    resize: none;
}

.pixel-form input::placeholder, .pixel-form textarea::placeholder {
    color: #608896;
}

.btn-pixel-dark {
    background: var(--btn-dark);
    color: white;
    border: 2px solid #000;
    padding: 0.8rem;
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.3);
    text-align: center;
    border-radius: 4px;
    transition: transform 0.1s, box-shadow 0.1s;
}
.btn-pixel-dark:active {
    transform: translate(3px, 3px);
    box-shadow: 0 0 0 rgba(0,0,0,0.3);
}

/* === Footer === */
footer {
    text-align: center;
    padding: 2rem;
    margin-top: auto;
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 600;
}

/* === Responsive === */
@media (max-width: 800px) {
    .content-wrapper {
        flex-direction: column;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
}
