/* Style global */
body {
    background-color: #1a1a1a; /* Gris très foncé (couleur bitume) */
    color: white;
    font-family: Arial, sans-serif;
    margin: 0;
}


/* Style du menu de navigation */
header {
    background-color: #000000;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e30613; /* Ligne rouge typique de ACC */
}

.logo {
    font-weight: bold;
    font-size: 1.2rem;
}

.logo span {
    color: #e30613; /* Le mot Competizione en rouge */
}

nav ul {
    list-style: none; /* Enlève les points des listes */
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: white;
    text-decoration: none; /* Enlève le soulignement des liens */
    text-transform: uppercase;
}

nav ul li a:hover {
    color: #e30613; /* Change de couleur au survol de la souris */
}


/* Style spécifique pour la section Voitures */
/* --- OPTIMISATION DU TABLEAU --- */

.table-container {
    margin: 50px auto;     /* 50px de marge haut/bas, 'auto' pour centrer horizontalement */
    width: 90%;            /* Le tableau occupe 90% de la largeur disponible */
    max-width: 1100px;     /* Mais il ne dépassera JAMAIS 1100px, même sur un écran géant */
    overflow-x: auto;      /* Garde le scroll sur mobile si besoin */
}

table {
    width: 100%;           /* Il prend 100% de son conteneur (donc 90% de la page) */
    border-collapse: collapse;
    background-color: var(--card-bg); /* Utilise notre variable de couleur */
    border-radius: 8px;    /* Un peu d'arrondi */
    overflow: hidden;      /* Pour que l'arrondi fonctionne avec le fond des cellules */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); /* Ajoute du relief */
}

th, td {
    padding: 18px;         /* On augmente un peu l'espace intérieur pour "respirer" */
    border-bottom: 1px solid #333;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #333;
}

th {
    background-color: #e30613; /* En-tête rouge ACC */
    color: white;
    text-transform: uppercase;
    font-size: 0.9rem;
}

tr:hover {
    background-color: #2a2a2a; /* Effet de survol sur les lignes */
}

strong {
    color: #e30613;
}

/* Amélioration du tableau */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.9rem; /* Texte un peu plus petit pour faire tenir les infos */
}

th {
    background-color: #e30613;
    padding: 12px;
    text-align: left;
    text-transform: uppercase;
}

td {
    padding: 15px;
    vertical-align: top; /* Aligne le texte en haut de la cellule */
    border-bottom: 1px solid #333;
    line-height: 1.4;
}

/* Style pour les petits textes (small) dans le tableau */
td small {
    color: #aaa;
    font-style: italic;
}

/* Mise en évidence de la colonne Catégorie */
td:first-child {
    border-left: 4px solid #e30613;
}


/* GRILLE DES CIRCUITS */
.circuit-grid {
    display: grid;
    /* Crée 2 colonnes égales sur un écran de 1024px+ */
    grid-template-columns: repeat(2, 1fr);
    gap: 30px; /* Espace entre les cartes */
    margin-top: 40px;
}

.circuit-card {
    background-color: #222;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden; /* Pour que l'image ne dépasse pas des coins arrondis */
    transition: transform 0.3s ease;
}

.circuit-card:hover {
    transform: translateY(-5px); /* Petit effet de lévitation au survol */
    border-color: #e30613;
}

/* ESPACE POUR TES CAPTURES D'ÉCRAN */
/* --- CADRE PHOTO : STYLE ÉLÉGANT ET ADAPTÉ --- */
.screenshot-placeholder {
    width: 100%;
    /* On retire l'aspect-ratio fixe qui forçait un cadre trop haut */
    background-color: #050505;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    border-bottom: 2px solid var(--primary-red);
}

.circuit-img {
    width: 100%;
    display: block;
    height: auto; /* Laisse l'image définir sa propre hauteur */
    object-fit: contain; /* Garantit qu'on voit tout (ailerons, etc.) */
}

/* --- SUPPRESSION DES EFFETS DE GROSSISSEMENT --- */
/* On désactive les transform: scale qui dérèglent l'image au survol */
.circuit-card:hover .circuit-img {
    transform: none !important; 
}

/* On peut garder un très léger changement de luminosité à la place du zoom */
/* C'est plus sobre et ça ne coupe pas l'image */
.circuit-card:hover .circuit-img {
    filter: brightness(1.1);
    transition: filter 0.3s ease;
}

/* Texte qui s'affiche si l'image est manquante */
.img-hint {
    position: absolute;
    color: #666;
    font-size: 0.8rem;
    text-align: center;
    padding: 10px;
}

.circuit-info {
    padding: 20px;
}

.circuit-info h3 {
    color: #e30613;
    margin-bottom: 15px;
    text-transform: uppercase;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
}

.circuit-info ul {
    list-style: none;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.circuit-info li {
    margin-bottom: 5px;
}

.circuit-info p.desc {
    font-size: 0.85rem;
    color: #ccc;
    font-style: italic;
}


.category-title {
    margin: 40px 0 20px 0;
    padding-left: 10px;
    border-left: 5px solid #e30613;
    text-transform: uppercase;
    font-size: 1.5rem;
}


/* Style de la page Compte Rendu */
.report-section {
    background-color: #222;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 8px;
}

.report-section h2 {
    color: #e30613;
    margin-bottom: 20px;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
}

code {
    background-color: #000;
    color: #e30613;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
}

.problem-box {
    background-color: #333;
    border-left: 5px solid #e30613;
    padding: 15px;
    margin-bottom: 15px;
}

.problem-box strong {
    color: #e30613;
    display: block;
    margin-bottom: 5px;
}


/* VARIABLES (Pratique pour changer le thème partout d'un coup) */
:root {
    --primary-red: #e30613;
    --dark-bg: #0b0b0b;
    --card-bg: #1a1a1a;
    --text-main: #f0f0f0;
    --font-header: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-main);
    font-family: var(--font-body);
    margin: 0;
}

h1, h2, h3, .logo {
    font-family: var(--font-header);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* SECTION HERO */
.hero-home {
    height: 60vh; /* 60% de la hauteur de l'écran */
    background: url('img/hero-bg.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 4px solid var(--primary-red);
}

.hero-overlay {
    background: rgba(0, 0, 0, 0.7);
    padding: 40px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-home h1 span { color: var(--primary-red); }

.btn-main {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 30px;
    background: var(--primary-red);
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: 1s;
}

.btn-main:hover {
    background: white;
    color: var(--primary-red);
}

/* GRILLE DES POINTS FORTS */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: -40px auto 40px; /* Chevauche légèrement le Hero */
    padding: 0 20px;
}

.feature-card {
    background: var(--card-bg);
    padding: 25px;
    border-top: 3px solid var(--primary-red);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.feature-card h3 { color: var(--primary-red); margin-bottom: 10px; }

/* SECTION INFO */
.home-info {
    max-width: 1000px;
    margin: 60px auto;
    padding: 40px;
    background: linear-gradient(90deg, #1a1a1a 0%, #0b0b0b 100%);
    border-right: 10px solid var(--primary-red);
}


/* --- ANIMATION DU MENU --- */

nav ul li a {
    position: relative; /* Nécessaire pour positionner la ligne par rapport au texte */
    text-decoration: none;
    color: white;
    font-family: var(--font-header);
    transition: color 0.3s;
}

/* On crée la ligne rouge sous le lien avec un pseudo-élément */
nav ul li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;      /* Positionne la ligne 5px sous le texte */
    width: 0;          /* État initial : largeur nulle */
    height: 2px;       /* Épaisseur de la ligne */
    background-color: var(--primary-red);
    transition: width 0.3s ease-in-out; /* Animation de la largeur */
}

/* Au survol, la ligne passe à 100% de largeur */
nav ul li a:hover::after {
    width: 100%;
}

/* On change aussi la couleur du texte pour plus de peps */
nav ul li a:hover {
    color: var(--primary-red);
}

/* Style pour la page active (optionnel : la ligne reste affichée) */
nav ul li a.active::after {
    width: 100%;
}


