/* ============================================================
   C.R.I.S.T. – Styles principaux
   Extrait et unifié depuis index.php / presentation.php
   ============================================================ */

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

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f8fafc;
    color: #1e2937;
    line-height: 1.6;
}

/* ----- Header ----- */
.header {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo img {
    height: 50px;
    margin-right: 12px;
}

.menu {
    display: flex;
    gap: 2rem;
}

.menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.menu a:hover {
    color: #bae6fd;
}

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

/* Variante plus étroite pour la page Présentation */
.container--narrow {
    max-width: 900px;
}

/* ----- Titres ----- */
h1 {
    color: #1e40af;
    margin-bottom: 1.5rem;
    text-align: center;
}

h2 {
    color: #1e40af;
    margin: 2rem 0 1rem;
}

p {
    margin-bottom: 1rem;
}

/* ----- Tableau de suivi ----- */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    overflow: hidden;
}

th,
td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background: #1e40af;
    color: white;
}

tr:last-child td {
    border-bottom: none;
}

.en-cours {
    background: #fef3c7;
    font-weight: bold;
}

.terminee {
    color: #166534;
}

.prevue {
    color: #64748b;
}

/* Badges de statut */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-terminee {
    background: #dcfce7;
    color: #166534;
}

.status-encours {
    background: #fef3c7;
    color: #92400e;
}

.status-prevue {
    background: #f1f5f9;
    color: #475569;
}

/* Bloc État actuel */
.etat-actuel {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin: 1.5rem 0;
    border-left: 5px solid #3b82f6;
}

/* ----- Cartes (page Présentation) ----- */
.card {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin: 1.5rem 0;
}

.back {
    display: inline-block;
    margin-top: 1rem;
    color: #1e40af;
    text-decoration: none;
    font-weight: 500;
}

.back:hover {
    text-decoration: underline;
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .menu {
        gap: 1.5rem;
    }

    table {
        font-size: 0.9rem;
    }

    th,
    td {
        padding: 10px 8px;
    }
}

/* ----- Grille de projets (canvas) ----- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.75rem;
    margin: 1rem 0 3rem;
}

.project-canvas {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-canvas:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(30, 64, 175, 0.15);
}

.project-canvas__image {
    aspect-ratio: 16 / 10;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-canvas__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
}

.project-canvas__body {
    padding: 1.25rem 1.5rem 1.5rem;
}

.project-canvas__body h3 {
    color: #1e40af;
    font-size: 1.25rem;
    margin-bottom: 0.35rem;
}

.project-canvas__body p {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 0.85rem;
}

.project-canvas__status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ----- Auth dans le menu ----- */
.menu .nav-user {
    color: #bae6fd;
    font-weight: 500;
    margin-right: 0.25rem;
}
.menu .nav-login {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
}
.menu .nav-login:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}
