/* --- DESIGN SYSTEM --- */
:root {
    --primary: #2563eb;          /* Bleu pro utilisé pour les services */
    --primary-dark: #1d4ed8;
    --text-dark: #0f172a;        /* Titres principaux */
    --text-light: #64748b;       /* Paragraphes et textes secondaires */
    --bg-site: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --radius: 10px;
    --container: 1100px;
    --transition: all 0.2s ease-in-out;
}

/* --- RESET & BASE --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-site);
    color: var(--text-dark);
    line-height: 1.6;
}

/* --- HEADER & NAVIGATION (ALIGNEMENT PARFAIT) --- */
header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center; /* Garantit que tous les textes sont sur la même ligne */
}

nav a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

nav a:hover, nav a[aria-current="page"] {
    color: var(--primary);
}

/* Style Contact : Harmonisé en taille avec les autres liens */
nav a[href="contact.html"] {
    color: var(--primary);
    font-weight: 700;
    border: 1.5px solid var(--primary);
    padding: 0.4rem 1rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
}

nav a[href="contact.html"]:hover {
    background: var(--primary);
    color: #fff !important;
}

/* --- STRUCTURE DE PAGE --- */
main {
    max-width: var(--container);
    margin: 2rem auto;
    padding: 0 1.5rem;
}

section { margin-bottom: 5rem; } /* Espacement aéré pour le confort de lecture */

h1 { font-size: 2.5rem; margin-bottom: 1.5rem; }
h2 { font-size: 1.8rem; margin-bottom: 1.5rem; color: var(--text-dark); }

/* --- GRILLES & COMPOSANTS (TAILLES ÉQUIVALENTES) --- */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

article {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}

article:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

/* Uniformité des images (Ratio 16:9 constant) */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.img-preview {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    margin-bottom: 1rem;
}

/* --- BOUTONS --- */
.cta-button, button[type="submit"] {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 0.8rem 2rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.cta-button:hover {
    background: var(--primary-dark);
}

/* --- FORMULAIRE --- */
form {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    max-width: 600px;
    margin: 0 auto;
}

input, select, textarea {
    width: 100%;
    padding: 0.8rem;
    margin-top: 0.5rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    background: #f9fafb;
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 4rem 1.5rem;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    margin-top: 5rem;
    display: flex;
    flex-direction: column;
    align-items: center; /* Centre tout horizontalement */
    gap: 1.5rem;         /* Espace uniforme entre le copyright, la nav et les réseaux */
}

footer nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    justify-content: center; /* Centre les liens de navigation */
    flex-wrap: wrap;         /* Protection pour le mobile */
    padding: 0;
}

footer div {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    nav { flex-direction: column; gap: 1rem; }
    nav ul { gap: 1rem; flex-wrap: wrap; justify-content: center; }
    h1 { font-size: 2rem; }
}