/* ==========================================================================
   style.css : toute la mise en forme du site.
   Plan du fichier :
     1. Couleurs et réglages de base (variables)
     2. Base : texte, liens, titres
     3. Mise en page : conteneur, grilles, sections
     4. En-tête et menu
     5. Boutons
     6. Cartes, étiquettes, listes
     7. Blocs de page : accueil, appel à l'action, missions
     8. Formulaire de contact
     9. Pied de page
    10. Mode sombre (facultatif : supprime tout ce bloc pour l'enlever)
   ========================================================================== */

   @import "header.css";

/* 1. COULEURS ET RÉGLAGES ----------------------------------------------- */
:root {
    /* Couleurs du logo : le dégradé bleu > vert se retrouve dans les traits décoratifs */
    --bleu: #2BC2EF;
    --vert: #8AF081;
    --degrade: linear-gradient(90deg, var(--bleu), var(--vert));

    /* Texte et fonds. Le texte reste foncé : le bleu clair du logo est trop pâle pour être lu sur blanc. */
    --encre: #14232E;          /* texte principal */
    --encre-douce: #4A5B67;    /* texte secondaire */
    --lien: #0A6C8A;           /* liens (contraste suffisant sur blanc) */
    --fond: #FFFFFF;
    --fond-alt: #F4F8FA;       /* sections alternées */
    --trait: #DCE5EA;          /* bordures */
    --nuit: #0F2330;           /* blocs foncés */

    --rayon: 14px;
    --ombre: 0 1px 2px rgba(15, 35, 48, .06), 0 8px 24px rgba(15, 35, 48, .06);
    --police: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}


/* 2. BASE ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--police);
    font-size: 1.0625rem;      /* 17 px */
    line-height: 1.6;
    color: var(--encre);
    background: var(--fond);
    -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; }

a { color: var(--lien); }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.25rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p  { margin: 0 0 1em; }

/* Focus clavier bien visible (accessibilité) */
:focus-visible { outline: 3px solid var(--bleu); outline-offset: 3px; border-radius: 4px; }

/* Lien d'évitement : visible uniquement quand on navigue au clavier */
.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 100;
    padding: 10px 16px; background: var(--nuit); color: #fff; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

/* Respecte le réglage "réduire les animations" du système */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}


/* 3. MISE EN PAGE -------------------------------------------------------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.section     { padding: 80px 0; }
.section-alt { background: var(--fond-alt); }

.section-title { margin-bottom: .35em; }
.section-intro { color: var(--encre-douce); font-size: 1.125rem; max-width: 640px; }
.section-title + .grid, .section-title + .stack { margin-top: 36px; }
.section-intro + .grid { margin-top: 36px; }

/* Grilles : s'adaptent seules à la largeur de l'écran */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

.stack { display: flex; flex-direction: column; gap: 24px; }

.more { margin: 32px 0 0; font-weight: 600; }


/* 4. EN-TÊTE ET MENU ----------------------------------------------------- */
.site-header {
    position: sticky; top: 0px; z-index: 1000;
    background: var(--nuit); border-bottom: 1px solid var(--trait);
 }
.header-inner {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 12px 24px; padding-top: 14px; padding-bottom: 14px;
}

/* Logo + image du nom, côte à côte (tes fichiers logo.svg et name.svg) */
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo { display: block; width: auto; height: 5dvh; }
.brand-name { display: block; width: auto; height: 5dvh; }

.main-nav ul { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0; padding: 0; list-style: none; }
.main-nav a {
    display: block; padding: 10px 14px; border-radius: 8px;
    color: var(--encre); font-weight: 600; font-size: .9375rem; text-decoration: none;
}
.main-nav a:hover { background: var(--fond-alt); }
/* Page courante : trait dégradé sous le lien */
.main-nav a[aria-current="page"] {
    background: linear-gradient(var(--fond-alt), var(--fond-alt)) padding-box;
    box-shadow: inset 0 -3px 0 var(--bleu);
    border-radius: 8px 8px 0 0;
}


/* 5. BOUTONS ------------------------------------------------------------- */
.btn {
    display: inline-block; padding: 14px 26px; border-radius: 10px; border: 2px solid transparent;
    font: inherit; font-weight: 700; text-decoration: none; text-align: center; cursor: pointer;
    transition: transform .15s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }

.btn-primary       { background: var(--encre); color: #fff; }
.btn-primary:hover { background: #22394A; }
.btn-outline       { border-color: var(--encre); color: var(--encre); background: transparent; }
.btn-outline:hover { background: var(--fond-alt); }
.btn-accent        { background: var(--vert); color: var(--nuit); }
.btn-accent:hover  { background: #A4F59C; }
.btn-outline-light { border-color: #fff; color: #fff; background: transparent; }
.btn-outline-light:hover { background: rgba(255, 255, 255, .1); }

.actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 32px 0 0; }


/* 6. CARTES, ÉTIQUETTES, LISTES ------------------------------------------ */
.card {
    background: var(--fond); border: 1px solid var(--trait); border-radius: var(--rayon);
    padding: 30px; box-shadow: var(--ombre); position: relative; overflow: hidden;
}
/* Petit trait dégradé en haut de chaque carte (rappel du logo) */
.card::before {
    content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 4px; background: var(--degrade);
}
.card h3 { margin-top: 6px; }
.card p:last-child { margin-bottom: 0; }

.card-dark { background: var(--nuit); color: #E6EEF2; border-color: var(--nuit); }
.card-dark h2, .card-dark h3 { color: #fff; }
.card-dark a { color: #fff; }

.num { display: block; font-weight: 800; font-size: .9375rem; color: var(--lien); }

/* Petites étiquettes en majuscules */
.eyebrow, .label {
    margin: 0 0 12px; font-size: .8125rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--lien);
}
.eyebrow { display: flex; align-items: center; gap: 12px; }
.eyebrow::before { content: ""; width: 40px; height: 4px; border-radius: 2px; background: var(--degrade); }
.card-dark .label { color: var(--bleu); }

.strong { font-weight: 700; }
.lead { font-size: 1.25rem; line-height: 1.55; color: var(--encre-douce); max-width: 680px; }

/* Étiquettes de technologies */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.tags li {
    padding: 4px 12px; border: 1px solid var(--trait); border-radius: 999px;
    background: var(--fond); font-size: .875rem; font-weight: 500;
}
.stack-card .tags li, .mission .tags li { background: var(--fond-alt); }

/* Listes à puces : le logo sert de puce */
.checks { margin: 18px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.checks li { position: relative; padding-left: 30px; }
.checks li::before {
    content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px;
    background: url("/resources/logo.svg") center / contain no-repeat;
}

.meta-list { margin: 48px 0 0; padding: 24px 0 0; list-style: none; border-top: 1px solid var(--trait); display: grid; gap: 12px; }
.meta-list strong { display: block; }


/* 7. BLOCS DE PAGE ------------------------------------------------------- */
/* Accueil : texte à gauche, stack technique à droite ; le logo en grand filigrane */
.hero { position: relative; padding: 7dvh 0 9dvh; overflow: hidden; }
.hero::after {
    content: ""; position: absolute; right: -120px; top: -3dvh; width: 520px; height: 520px;
    background: url("/resources/logo.svg") center / contain no-repeat; opacity: .06; pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 48px; }
.hero-grid > :first-child { flex: 1 1 540px; min-width: 0; }
.hero-grid > aside { flex: 1 1 380px; min-width: 0; }
.stack-card h2 { font-size: 1.25rem; margin-bottom: 18px; }
.stack-card .label { margin: 14px 0 8px; color: var(--encre-douce); }

.facts { display: flex; flex-wrap: wrap; gap: 12px 36px; margin: 44px 0 0; padding: 26px 0 0; list-style: none; border-top: 1px solid var(--trait); }
.facts strong { display: block; font-size: 1.375rem; line-height: 1.2; }
.facts span { font-size: .875rem; color: var(--encre-douce); }

/* Bandeau de titre des pages intérieures */
.page-hero { padding: 64px 0 56px; background: var(--fond); border-bottom: 1px solid var(--trait); }
.page-hero h1 { max-width: 860px; }

/* Missions (page Réalisations) */
.mission { display: flex; flex-wrap: wrap; gap: 28px 44px; padding: 36px; }
.mission-head { flex: 1 1 260px; min-width: 0; }
.mission-head h2 { font-size: 1.75rem; margin-bottom: .2em; }
.mission-body { flex: 2 1 460px; min-width: 0; }

/* Appel à l'action en bas de page */
.cta { background: var(--nuit); color: #fff; padding: 72px 0; }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.cta h2 { margin-bottom: .3em; }
.cta p { margin: 0; color: #C9D6DE; font-size: 1.125rem; }
.cta .actions { margin: 0; }


/* Pages légales (mentions légales, confidentialité) : texte lisible, colonne étroite */
.legal { max-width: 800px; }
.legal h2 { font-size: 1.375rem; margin: 2em 0 .5em; }
.legal h2:first-child { margin-top: 0; }
.legal ul { margin: 0 0 1em; padding-left: 22px; }
.legal li { margin-bottom: .35em; }
.legal code { padding: 1px 6px; border-radius: 6px; background: var(--fond-alt); font-size: .9em; }
.legal-date { margin-top: 2.5em; font-size: .875rem; color: var(--encre-douce); }


/* 8. FORMULAIRE DE CONTACT ----------------------------------------------- */
.contact-grid { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.contact-grid > :first-child { flex: 2 1 540px; min-width: 0; }
.contact-grid > aside { flex: 1 1 300px; min-width: 0; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 0 20px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.field label { font-weight: 600; font-size: .9375rem; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
    width: 100%; padding: 13px 14px; font: inherit; color: var(--encre); background: #fff;
    border: 1px solid #8FA3B0; border-radius: 8px;
}
.field textarea { resize: vertical; min-height: 140px; }
.field-check { flex-direction: row; align-items: flex-start; gap: 12px; }
.field-check input { flex: none; width: 22px; height: 22px; margin: 3px 0 0; }
.field-check label { font-weight: 400; color: var(--encre-douce); font-size: .9375rem; }

/* Champ piège anti-robot : hors écran (pas display:none, certains robots l'ignorent alors) */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.notice { margin-bottom: 24px; padding: 16px 18px; border-radius: 10px; border: 1px solid; }
.notice ul { margin: 8px 0 0; padding-left: 20px; }
.notice-ok    { background: #E8F9EC; border-color: #9BD8A9; color: #124B22; }
.notice-error { background: #FDECEC; border-color: #F0A6A6; color: #6B1414; }

.contact-list { margin: 0 0 24px; }
.contact-list dt { margin-top: 16px; font-size: .8125rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--bleu); }
.contact-list dd { margin: 2px 0 0; }


/* 9. PIED DE PAGE -------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--trait); padding: 48px 0 28px; background: var(--fond); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer-brand { flex: 1 1 280px; }
.footer-brand .brand-logo { width: 32px; height: 32px; }
.footer-brand .brand-name { height: 22px; }
.footer-brand p { margin: 14px 0 0; font-size: .9375rem; color: var(--encre-douce); }
.footer-links { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: .9375rem; }
.footer-legal {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
    margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--trait);
    font-size: .8125rem; color: var(--encre-douce);
}
.footer-legal a { margin-left: 12px; }
.footer-legal a:first-child { margin-left: 0; }


/* Petits écrans -------------------------------------------------------- */
@media (max-width: 640px) {
    .container { padding: 0 16px; }
    .section { padding: 56px 0; }
    .hero { padding: 44px 0 56px; }
    .card, .mission { padding: 22px; }
    .brand-name { height: 24px; }
    .actions .btn { flex: 1 1 100%; }
}


/* 10. MODE SOMBRE (facultatif) -------------------------------------------
   S'active quand l'appareil du visiteur est réglé en mode sombre.
   Pour ne pas l'avoir : supprime ce bloc entier.
   --------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
    :root {
        --encre: #E8EEF2;
        --encre-douce: #A9BAC6;
        --lien: #5FD0F2;
        --fond: #0B1820;
        --fond-alt: #10222D;
        --trait: #25394A;
        --nuit: #071017;
        --ombre: none;
    }
    .btn-primary { background: #fff; color: #0B1820; }
    .btn-primary:hover { background: #DDE7EC; }
    .btn-outline { border-color: #E8EEF2; }
    .card-dark { background: #12303F; border-color: #12303F; }
    .field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
        background: #0B1820; border-color: #5C7385;
    }
    .notice-ok    { background: #123222; border-color: #2E7A4A; color: #C9F1D6; }
    .notice-error { background: #3A1818; border-color: #8A3A3A; color: #F6CFCF; }
    /* Le nom est en gris foncé dans name.svg : on l'éclaircit sur fond sombre */
    .brand-name { filter: brightness(2.4); }
}
