@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600;700&family=DM+Sans:wght@300;400;500&display=swap');

/* ============================================================
   VARIABLES GLOBALES
   Couleurs, polices et espacements réutilisables partout
   ============================================================ */
:root {
    --bg-dark:      #FFFFFF;
    --bg-card:      rgba(255,255,255,0.03);
    --border-dark:  #1A3148;
    --border-mid:   #2A4A6A;
    --text-light:   #D6E8FA;
    --text-muted:   #7EB0D8;
    --text-dim:     #4F7A9E;
    --accent:       #E8611A;
    --accent-light: #FF8C3A;
    --font-serif:   'Cormorant Garamond', serif;
    --font-sans:    'DM Sans', sans-serif;
}

/* ============================================================
   BASE
   Styles généraux appliqués à toute la page
   ============================================================ */
body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Classe utilitaire pour modifier la couleur de fond */
.modifier {
    background-color: #7EB0D8;
}

/* ============================================================
   NAVBAR
   Barre de navigation en haut de page, fond blanc
   ============================================================ */
nav {
    font-family: var(--font-sans);
    background: #FFFFFF;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    list-style: none;
    gap: 4px;
}

/* Ligne orange décorative en bas de la navbar */
nav::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, #E8611A 0%, #FF8C3A 50%, #E8611A 100%);
}

/* Logo / marque à gauche de la navbar */
.nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-brand-icon { width: 36px; height: 36px; border: 1.5px solid #2A6CB5; background: rgba(42,108,181,0.12); display: flex; align-items: center; justify-content: center; }
.nav-brand-icon svg { width: 18px; height: 18px; stroke: #4F9EE8; fill: none; stroke-width: 1.5; }
.nav-brand-title { font-family: var(--font-serif); font-size: 15px; font-weight: 600; color: #2A4A6A; letter-spacing: 0.08em; text-transform: uppercase; display: block; line-height: 1.1; }
.nav-brand-sub { font-size: 10px; font-weight: 300; color: #4F7A9E; letter-spacing: 0.15em; text-transform: uppercase; display: block; }

/* Liste des liens de navigation */
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }

/* Style des liens de navigation, couleur bleu marine */
.nav-links .nav-link,
nav .nav-item .nav-link {
    font-size: 12.5px;
    font-weight: 400;
    color: #2A4A6A;
    letter-spacing: 0.05em;
    padding: 6px 14px !important;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
}

/* Effet hover : passage en orange */
.nav-links .nav-link:hover,
nav .nav-item .nav-link:hover {
    color: #E8611A;
    border-color: rgba(232,97,26,0.3);
    background: rgba(232,97,26,0.07);
}

/* Lien mis en avant (ex: bouton d'action) */
.nav-links .nav-link.accent { color: var(--accent); border-color: rgba(232,97,26,0.3); background: rgba(232,97,26,0.07); }
.nav-links .nav-link.accent:hover { color: var(--accent-light); border-color: var(--accent); background: rgba(232,97,26,0.15); }

/* Séparateur vertical entre les liens */
.nav-sep { width: 1px; height: 18px; background: var(--border-dark); margin: 0 6px; }

/* Badge "admin" affiché à côté du nom */
.nav-tag-admin { font-size: 9px; background: rgba(79,158,232,0.12); color: #4F9EE8; letter-spacing: 0.12em; text-transform: uppercase; padding: 2px 7px; border: 1px solid rgba(79,158,232,0.3); margin-left: 5px; vertical-align: middle; }

/* ============================================================
   MAIN
   Conteneur principal du contenu de la page
   ============================================================ */
main {
    flex: 1;
    padding: 3rem 2rem 4rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* ============================================================
   HERO
   Grande image en haut de la page avec texte centré par dessus
   ============================================================ */
.hero {
    height: 50vh;
    background-image: url("../img/buildings.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Overlay sombre pour rendre le texte lisible sur l'image */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

/* Contenu affiché au dessus de l'overlay */
.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

/* Titre principal dans le hero, forcé en blanc */
.hero h1 {
    color: white;
    margin: 0;
}

/* Sous-titre dans le hero */
.hero-subtitle {
    color: rgba(255,255,255,0.85);
    font-size: 1rem;
    letter-spacing: 0.08em;
    margin-top: 0.75rem;
}

/* ============================================================
   H1
   Style du titre principal hors hero
   ============================================================ */
h1 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 2vw, 2rem);
    font-weight: 400;
    margin-top: 2rem;
    color: var(--text-dim);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.15;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

/* Petite barre orange décorative sous le h1 */
h1::after {
    content: '';
    display: block;
    margin-top: 10px;
    width: 56px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
}

/* ============================================================
   BLOC BIENVENUE
   Bandeau affiché quand l'utilisateur est connecté
   ============================================================ */
.welcome-block {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-left: 3px solid var(--accent);
    padding: 1rem 1.5rem;
    margin-bottom: 2.5rem;
    animation: fadeSlideIn 0.45s ease both;
}

/* Icône décorative à gauche du bloc */
.welcome-block::before {
    content: '▸';
    color: var(--accent);
    font-size: 13px;
    flex-shrink: 0;
}

/* ============================================================
   H2
   Sous-titres de section
   ============================================================ */
h2 {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0;
}

h2 strong {
    color: var(--text-light);
    font-weight: 600;
}

/* ============================================================
   SECTION PRÉSENTATION
   3 cartes d'info affichées sur la page d'accueil
   ============================================================ */

/* Conteneur global de la section */
.presentation {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
}

/* Texte d'introduction centré au dessus des cartes */
.pres-intro {
    text-align: center;
    margin-bottom: 2.5rem;
}

.pres-intro h3 {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 600;
    color: #2A4A6A;
    margin-bottom: 0.75rem;
}

.pres-intro p {
    color: #4F7A9E;
    font-size: 0.95rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Rangée de cartes côte à côte */
.pres-cards {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Carte individuelle avec bordure orange en haut */
.pres-card {
    background: #fff;
    border: 1px solid #e0e8f0;
    border-top: 3px solid var(--accent);
    padding: 1.75rem 1.5rem;
    flex: 1;
    min-width: 220px;
    max-width: 320px;
    text-align: center;
    animation: fadeSlideIn 0.5s ease both;
    transition: box-shadow 0.2s ease;
}

/* Légère ombre au survol de la carte */
.pres-card:hover {
    box-shadow: 0 4px 20px rgba(42,74,106,0.1);
}

/* Icône emoji en haut de la carte */
.pres-card-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.75rem;
}

.pres-card h4 {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: #2A4A6A;
    margin-bottom: 0.5rem;
}

.pres-card p {
    font-size: 0.875rem;
    color: #4F7A9E;
    line-height: 1.6;
}

/* ============================================================
   FOOTER
   Pied de page avec bordure et fond légèrement sombre
   ============================================================ */
footer {
    font-family: var(--font-sans);
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
    padding: 1.25rem 2rem;
    border-top: 1px solid var(--border-dark);
    background: rgba(0,0,0,0.15);
}

/* ============================================================
   ANIMATION
   Apparition en fondu avec léger glissement vers le haut
   ============================================================ */
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE TABLETTE (max 768px)
   Ajustements pour les écrans moyens (iPad, etc.)
   ============================================================ */
@media (max-width: 768px) {
    nav { padding: 0.5rem 1rem; flex-wrap: wrap; height: auto; min-height: 64px; gap: 2px; }
    main { padding: 2rem 1.25rem 3rem; }
    h1 { font-size: clamp(1.6rem, 5.5vw, 2.2rem); margin-bottom: 1.5rem; }
    .welcome-block { width: 100%; padding: 0.9rem 1.1rem; }
    h2 { font-size: 0.85rem; }

    /* Les cartes passent en colonne */
    .pres-cards { flex-direction: column; align-items: center; }
    .pres-card { max-width: 100%; width: 100%; }
    .pres-intro h3 { font-size: 1.3rem; }
}

/* ============================================================
   RESPONSIVE MOBILE (max 480px)
   Ajustements pour les petits écrans (smartphones)
   ============================================================ */
@media (max-width: 480px) {
    nav { padding: 0.5rem 0.75rem; justify-content: flex-start; }
    nav .nav-item .nav-link { font-size: 11.5px; padding: 5px 10px !important; }
    main { padding: 1.5rem 1rem 2.5rem; }
    h1 { font-size: 1.45rem; letter-spacing: 0.02em; }
    h1::after { width: 36px; }
    .welcome-block { flex-direction: column; align-items: flex-start; gap: 6px; padding: 0.8rem 1rem; border-left-width: 2px; }
    h2 { font-size: 0.8rem; letter-spacing: 0.03em; }
    footer { font-size: 10px; padding: 1rem 0.75rem; }

    /* Ajustements supplémentaires pour mobile */
    .pres-intro h3 { font-size: 1.1rem; }
    .pres-intro p { font-size: 0.85rem; }
    .pres-card { padding: 1.25rem 1rem; }
    .pres-card-icon { font-size: 1.6rem; }
    .hero-subtitle { font-size: 0.85rem; }
    .presentation { margin: 2rem auto; padding: 0 1rem; }
}