/* =====================================================================
   STYLES DU SITE — Informaticiens du Pays
   Pour changer les couleurs ou la police, modifiez UNIQUEMENT les
   « variables » juste en dessous (section 1). Le reste suit tout seul.
   ===================================================================== */

/* ---------- 1. VARIABLES (couleurs, polices, espacements) ---------- */
:root {
  color-scheme: light dark;   /* champs de formulaire et barres de défilement suivent le mode clair/sombre */
  --marque: #0a6cc4;          /* bleu principal (boutons, liens)          */
  --marque-fonce: #08549a;    /* bleu au survol                           */
  --marque-clair: #2196f3;    /* bleu d'origine du thème Blogger          */
  --fond: #ffffff;            /* fond des pages                           */
  --fond-gris: #f3f6f9;       /* fond des sections alternées              */
  --carte: #ffffff;           /* fond des cartes                          */
  --texte: #1c2733;           /* texte principal                          */
  --texte-doux: #4b5b6b;      /* texte secondaire                         */
  --bordure: #dbe3ea;         /* traits fins                              */
  --nuit: #0b1b2b;            /* bleu nuit (hero, chiffres)               */
  --rayon: 14px;              /* arrondi des cartes                       */
  --ombre: 0 6px 24px rgba(11, 27, 43, 0.08);
  --police: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --largeur: 1140px;
}

/* Mode sombre automatique selon le réglage du téléphone / ordinateur */
@media (prefers-color-scheme: dark) {
  :root {
    --marque: #5db3ff;
    --marque-fonce: #8cc9ff;
    --fond: #0d1620;
    --fond-gris: #121e2a;
    --carte: #16232f;
    --texte: #e6edf3;
    --texte-doux: #a9b8c6;
    --bordure: #263646;
    --ombre: 0 6px 24px rgba(0, 0, 0, 0.35);
  }
}

/* ---------- 2. POLICE ----------
   On utilise les polices déjà installées sur l'appareil du visiteur (SF Pro, Segoe UI, Roboto…) :
   aucun fichier à télécharger, donc affichage instantané et aucune requête vers un autre site. */

/* ---------- 3. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--police); font-size: 1.0625rem; line-height: 1.7; color: var(--texte); background: var(--fond); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--marque); text-underline-offset: 3px; }
a:hover { color: var(--marque-fonce); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6em; font-weight: 700; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul { padding-left: 1.2em; }
:focus-visible { outline: 3px solid var(--marque-clair); outline-offset: 3px; border-radius: 4px; }

.conteneur { width: min(100% - 2rem, var(--largeur)); margin-inline: auto; }
.conteneur-etroit { width: min(100% - 2rem, 760px); }
.centre { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lien-evitement { position: absolute; left: -999px; top: 0; background: var(--marque); color: #fff; padding: 0.6rem 1rem; z-index: 100; }
.lien-evitement:focus { left: 0; }

/* ---------- 4. EN-TÊTE ET MENU ---------- */
.entete { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--fond) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--bordure); }
.entete-interne { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.marque { display: flex; align-items: center; gap: 0.6rem; color: var(--texte); text-decoration: none; font-weight: 700; }
.marque img { border-radius: 8px; }
.menu { display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.menu a { display: block; padding: 0.6rem 0.8rem; border-radius: 8px; color: var(--texte); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.menu a:hover { background: var(--fond-gris); color: var(--marque); }
.menu-bouton { display: none; background: none; border: 1px solid var(--bordure); border-radius: 8px; padding: 0.55rem 0.7rem; cursor: pointer; color: var(--texte); }
.menu-icone, .menu-icone::before, .menu-icone::after { display: block; width: 20px; height: 2px; background: currentColor; position: relative; content: ""; }
.menu-icone::before { position: absolute; top: -6px; }
.menu-icone::after { position: absolute; top: 6px; }

/* Petits écrans : menu déroulant (actif seulement si JavaScript fonctionne) */
@media (max-width: 760px) {
  .js .menu-bouton { display: block; }
  .js .menu { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; background: var(--fond); border-bottom: 1px solid var(--bordure); padding: 0.5rem 1rem 1rem; }
  .js .menu.ouvert { display: flex; }
  .entete-interne { flex-wrap: wrap; }
}

/* ---------- 5. BOUTONS ---------- */
.bouton { display: inline-block; background: var(--marque); color: #fff; padding: 0.8rem 1.6rem; border-radius: 999px; border: 2px solid var(--marque); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: background 0.2s, transform 0.2s; }
.bouton:hover { background: var(--marque-fonce); border-color: var(--marque-fonce); color: #fff; transform: translateY(-1px); }
.bouton:disabled { opacity: 0.6; cursor: wait; transform: none; }
.bouton-clair { background: transparent; border-color: #fff; color: #fff; }
.bouton-clair:hover { background: #fff; color: var(--nuit); border-color: #fff; }
@media (prefers-color-scheme: dark) { .bouton { color: #04121f; } .bouton:hover { color: #04121f; } }
@media (prefers-color-scheme: dark) { .bouton-clair { color: #fff; } .bouton-clair:hover { color: var(--nuit); } }

/* ---------- 6. SECTION D'ACCUEIL (« hero ») ---------- */
.hero { position: relative; display: grid; place-items: center; min-height: min(88vh, 760px); min-height: min(88svh, 760px); color: #fff; background: var(--nuit); overflow: hidden; text-align: center; }
.hero-fond { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-voile { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 27, 43, 0.72), rgba(11, 27, 43, 0.86)); }
.hero-contenu { position: relative; padding-block: 5rem; }
.hero-sur { text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.9rem; opacity: 0.9; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 4rem); text-transform: uppercase; letter-spacing: 0.04em; }
.hero-texte { font-size: 1.2rem; max-width: 40rem; margin-inline: auto; opacity: 0.95; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; margin: 1.8rem 0; }
.reseaux { display: flex; gap: 1.2rem; justify-content: center; list-style: none; padding: 0; margin: 0; }
.reseaux a { color: #fff; opacity: 0.85; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.4); }
.reseaux a:hover { opacity: 1; color: #fff; }

/* ---------- 7. SECTIONS ---------- */
.section { padding-block: clamp(3rem, 8vw, 5.5rem); }
.section-gris { background: var(--fond-gris); }
.titre-section { text-align: center; font-size: clamp(1.7rem, 4vw, 2.4rem); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2.5rem; }
.titre-section::after { content: ""; display: block; width: 56px; height: 4px; border-radius: 4px; background: var(--marque-clair); margin: 0.8rem auto 0; }
.chapeau { font-size: 1.15rem; color: var(--texte-doux); }

/* À propos */
.apropos { display: grid; grid-template-columns: 1.2fr 0.8fr 1.2fr; gap: 2rem; align-items: start; }
.apropos-photo { border-radius: var(--rayon); box-shadow: var(--ombre); width: 100%; max-height: 520px; object-fit: cover; }
.lieux { list-style: none; padding: 0; }
.lieux li { padding: 0.35rem 0 0.35rem 1.4rem; position: relative; }
.lieux li::before { content: "📍"; position: absolute; left: 0; font-size: 0.85rem; top: 0.5rem; }
.lien-contact { font-weight: 700; }
.etiquettes { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.etiquettes li { background: var(--carte); border: 1px solid var(--bordure); border-radius: 999px; padding: 0.3rem 0.9rem; font-size: 0.9rem; font-weight: 600; }
@media (max-width: 900px) { .apropos { grid-template-columns: 1fr; } .apropos-photo { max-width: 360px; margin-inline: auto; } }

/* Services */
.grille-services { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.service { background: var(--carte); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 1.8rem; box-shadow: var(--ombre); transition: transform 0.2s; }
@media (hover: hover) { .service:hover { transform: translateY(-4px); } }
.service-icone { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: var(--fond-gris); font-size: 1.8rem; margin-bottom: 1rem; }
.service ul { margin: 0; color: var(--texte-doux); font-size: 0.98rem; }
.service li { margin-bottom: 0.4rem; }

/* Chiffres clés (dégradé de remplacement de l'ancienne image « parallax ») */
.chiffres { background: linear-gradient(135deg, var(--nuit), #12476f); color: #fff; padding-block: 4rem; }
.grille-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 2rem; text-align: center; }
.chiffre-valeur { display: block; font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 700; line-height: 1.1; }
.chiffre-texte { opacity: 0.9; }

/* ---------- 8. CARTES (réalisations) ---------- */
.grille-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.6rem; }
.carte { background: var(--carte); border: 1px solid var(--bordure); border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); display: flex; flex-direction: column; transition: transform 0.2s; }
@media (hover: hover) { .carte:hover { transform: translateY(-4px); } }
.carte-image { display: block; aspect-ratio: 16 / 10; background: var(--fond-gris); overflow: hidden; }
.carte-image img { width: 100%; height: 100%; object-fit: cover; }
.carte-vide { display: grid; place-items: center; height: 100%; font-size: 3rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--nuit), var(--marque)); }
.carte-texte { padding: 1.2rem 1.4rem 1.5rem; }
.carte-texte time { font-size: 0.85rem; color: var(--texte-doux); }
.carte-texte h3 { font-size: 1.2rem; margin: 0.3rem 0 0.5rem; }
.carte-texte h3 a { color: var(--texte); text-decoration: none; }
.carte-texte h3 a:hover { color: var(--marque); }
.grille-cartes + .centre { margin-top: 2.5rem; }   /* espace entre les cartes et le bouton « Voir toutes… » */
.carte-texte p { color: var(--texte-doux); font-size: 0.97rem; margin: 0; }

/* ---------- 9. ARTICLE ---------- */
.article-entete { background: var(--fond-gris); padding-block: 3rem 2.5rem; margin-bottom: 2.5rem; }
.article-entete h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); }
.fil { font-size: 0.9rem; color: var(--texte-doux); }
.texte figure { margin: 1.6rem 0; }
.texte figure img { border-radius: var(--rayon); margin-inline: auto; box-shadow: var(--ombre); }
.texte h2 { margin-top: 2rem; }
.texte li { margin-bottom: 0.35rem; }
.appel { background: var(--fond-gris); border-radius: var(--rayon); padding: 2rem; text-align: center; margin-block: 3rem 2rem; }
.article-nav { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 4rem; font-weight: 600; }
.article-nav a { max-width: 48%; }
.signature { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--bordure); color: var(--texte-doux); font-size: 0.95rem; }

/* ---------- 10. CONTACT ET FORMULAIRE ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: start; }
.contact-liste { list-style: none; padding: 0; }
.contact-liste li { padding: 0.3rem 0; }
.formulaire { background: var(--carte); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 1.8rem; box-shadow: var(--ombre); }
.champ { margin-bottom: 1.1rem; }
.champ label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.champ input, .champ textarea { width: 100%; font: inherit; color: var(--texte); background: var(--fond); border: 1.5px solid var(--bordure); border-radius: 10px; padding: 0.7rem 0.9rem; }
.champ input:focus, .champ textarea:focus { border-color: var(--marque-clair); outline: none; box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.25); }
.champ [aria-invalid="true"] { border-color: #c62828; }
/* Champ piège : hors écran (surtout PAS « display:none », que certains robots détectent) */
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.formulaire-info { font-size: 0.85rem; color: var(--texte-doux); margin-top: 1rem; }
.statut { margin: 1rem 0 0; font-weight: 700; min-height: 1.5em; }
.statut.ok { color: #1b7a3a; }
.statut.erreur { color: #c62828; }
@media (prefers-color-scheme: dark) { .statut.ok { color: #6fdc8c; } .statut.erreur { color: #ff8a80; } }
.alerte { background: #fff4e5; color: #5f3b00; padding: 0.8rem; border-radius: 8px; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }

/* ---------- 11. PIED DE PAGE ---------- */
.pied { background: var(--nuit); color: #cfd9e3; padding-block: 2rem; font-size: 0.95rem; }
.pied a { color: #fff; }
.pied-interne { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }
.pied p { margin: 0; }
.pied-liens { display: flex; flex-wrap: wrap; gap: 1.2rem; list-style: none; margin: 0; padding: 0; }

/* ---------- 12. ACCESSIBILITÉ : respect de « réduire les animations » ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
