/* ============================================================
   PY-Conseil – feuille de style de la page
   ============================================================ */

/* Polices hébergées avec la page (dossier "polices") : aucun appel à Google, aucun cookie */
@font-face{font-family:Montserrat;font-weight:400;font-display:swap;src:url(polices/montserrat-latin-400-normal.woff2) format("woff2")}
@font-face{font-family:Montserrat;font-weight:500;font-display:swap;src:url(polices/montserrat-latin-500-normal.woff2) format("woff2")}
@font-face{font-family:Montserrat;font-weight:600;font-display:swap;src:url(polices/montserrat-latin-600-normal.woff2) format("woff2")}
@font-face{font-family:Montserrat;font-weight:700;font-display:swap;src:url(polices/montserrat-latin-700-normal.woff2) format("woff2")}
@font-face{font-family:"Varela Round";font-weight:400;font-display:swap;src:url(polices/varela-round-latin-400-normal.woff2) format("woff2")}

/* ============================================================
   COULEURS ET POLICES (charte PY-Conseil)
   Pour changer une couleur partout, modifiez-la ici seulement.
   ============================================================ */
:root{
  --gris-fonce:#424242;   /* bandeau */
  --jaune:#FDC100;        /* titres sur fond foncé */
  --rouge:#F50A30;        /* bouton d'appel, titres de section */
  --ardoise:#3D4459;      /* sous-titres */
  --texte:#333333;
  --fond:#FFFFFF;
  --fond-doux:#F5F5F5;    /* survol des icônes */
  /* Dégradés de fond : modifiez les couleurs ici pour tout ajuster */
  --degrade-fonce:linear-gradient(135deg,#424242 0%,#3D4459 100%);   /* accroche et contact */
  --degrade-clair:linear-gradient(160deg,#F4F5F8 0%,#FFF8E1 100%);  /* une section sur deux */

  /* ÉCHELLE TYPOGRAPHIQUE : 5 tailles seulement, utilisées partout.
     Graisses : 400 (texte), 600 (accents), 700 (titre principal). */
  --t-titre:clamp(30px,4vw,44px);   /* titre principal */
  --t-section:clamp(24px,3vw,30px); /* titres de section et des fenêtres */
  --t-accent:20px;                  /* sous-titre, noms des réalisations, devise */
  --t-texte:17px;                   /* texte courant, boutons, formulaire */
  --t-petit:14px;                   /* adresses web, mentions, pied de page */
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:Montserrat,system-ui,sans-serif;color:var(--texte);background:var(--fond);line-height:1.65;font-size:var(--t-texte)}
a{color:inherit}
h1,h2,h3{line-height:1.25}
strong,b{font-weight:600}
/* La Varela Round est réservée aux accents : devise, sous-titre, noms des réalisations */
.accent{font-family:"Varela Round",Montserrat,sans-serif;font-weight:400}

/* ---------- Bandeau du haut ---------- */
.bandeau{background:var(--gris-fonce);display:flex;align-items:center;justify-content:space-between;
  gap:24px;padding:18px 8vw}
.bandeau img{height:56px;width:auto;display:block}
.bandeau .devise{color:var(--jaune);font-size:var(--t-accent);letter-spacing:.08em;text-transform:uppercase;text-align:right}

/* ---------- Cartouche de navigation flottant ----------
   Changement d'icône active : instantané, sans animation.
   Seule l'étiquette au survol apparaît en fondu. */
.cartouche{position:fixed;right:16px;top:50%;transform:translateY(-50%);z-index:10;
  background:#fff;border-radius:40px;padding:8px;display:flex;flex-direction:column;gap:6px;
  box-shadow:0 6px 24px rgba(0,0,0,.18)}
.cartouche a{position:relative;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;
  color:var(--ardoise);text-decoration:none}
.cartouche svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.cartouche a:hover,.cartouche a:focus-visible{background:var(--fond-doux)}
.cartouche a.actif{background:var(--rouge);color:#fff}
.cartouche a.appel-icone{color:var(--rouge)}
.cartouche a.appel-icone.actif{color:#fff}
.cartouche a::after{content:attr(aria-label);position:absolute;right:56px;white-space:nowrap;
  background:var(--gris-fonce);color:#fff;font-size:var(--t-petit);font-weight:600;padding:6px 12px;border-radius:20px;
  opacity:0;pointer-events:none;transition:opacity .2s}
.cartouche a:hover::after,.cartouche a:focus-visible::after{opacity:1}

/* ---------- Contenu ---------- */
/* Les fonds vont d'un bord à l'autre, le texte reste dans une colonne de 1000px max */
section{padding:72px max(8vw, calc((100% - 1000px) / 2))}
section:nth-of-type(even){background:var(--degrade-clair)}

.accroche{padding-top:112px;padding-bottom:112px;background:var(--degrade-fonce);color:#fff}
.accroche h1{font-size:var(--t-titre);font-weight:700;color:#fff;max-width:20ch}
.accroche .sous-titre{color:var(--jaune);font-size:var(--t-accent);margin-top:16px}

h2{font-size:var(--t-section);color:var(--rouge);font-weight:600;margin-bottom:24px}
section p + p{margin-top:16px}
section p{max-width:65ch}

/* ---------- Bouton d'appel (action unique) ---------- */
.appel{display:inline-block;margin-top:32px;background:var(--rouge);color:#fff;text-decoration:none;
  font-weight:600;padding:14px 28px;border-radius:40px;transition:transform .15s}
.appel:hover,.appel:focus-visible{transform:translateY(-2px)}
.appel strong{white-space:nowrap}

/* ---------- Réalisations ---------- */
.realisations{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:24px}
.carte{background:#fff;border-radius:12px;padding:24px;border-top:4px solid var(--jaune);
  box-shadow:0 4px 18px rgba(61,68,89,.08)}
.carte h3{color:var(--ardoise);font-size:var(--t-accent)}
/* Aperçu du site en haut de la carte, collé aux bords */
.carte{overflow:hidden}
.carte .apercu{display:block;width:calc(100% + 48px);height:auto;aspect-ratio:16/10;object-fit:cover;object-position:top;
  margin:-24px -24px 20px;border-bottom:1px solid rgba(61,68,89,.1)}
.carte .url{font-size:var(--t-petit);color:var(--rouge);text-decoration:none;display:inline-block;margin:2px 0 12px}
.carte .resultat{margin-top:12px;font-weight:600}
.carte .resultat span{color:var(--rouge)}

/* ---------- Contact et formulaire (fond foncé) ---------- */
section#contact{background:var(--degrade-fonce);color:#fff}
#contact h2{color:var(--jaune)}
#contact .appel{margin-top:8px}
.email{margin-top:16px}
.email a{text-decoration:underline;text-underline-offset:3px}
.email a:hover{color:var(--jaune)}
form{margin-top:56px;padding-top:40px;border-top:1px solid rgba(255,255,255,.15);max-width:560px;display:grid;gap:16px}
form .intro{color:var(--jaune);font-weight:600}
label{font-weight:600;font-size:var(--t-petit);display:block;margin-bottom:4px}
input,textarea{width:100%;font:inherit;padding:12px;border:1px solid transparent;border-radius:8px;background:#fff;color:var(--texte)}
input:focus,textarea:focus{outline:2px solid var(--jaune);border-color:var(--jaune)}
textarea{min-height:130px;resize:vertical}
.piege{position:absolute;left:-9999px}  /* champ anti-spam, invisible */
form button{justify-self:start;background:transparent;color:#fff;border:2px solid #fff;font:inherit;font-weight:600;
  padding:10px 26px;border-radius:40px;cursor:pointer}
form button:hover{background:#fff;color:var(--texte)}
.mention{font-size:var(--t-petit);opacity:.8}
.message-envoi{display:none;padding:14px 18px;border-radius:8px;font-weight:600}
.message-envoi.ok{display:block;background:#E8F6EC;color:#1E6B34}
.message-envoi.erreur{display:block;background:#FDE8EB;color:#9B0620}

footer{padding:32px max(8vw, calc((100% - 1000px) / 2)) 96px;font-size:var(--t-petit);color:#bbb;background:#2E2E2E}
.liens-legaux{display:flex;flex-wrap:wrap;gap:6px 20px;margin-bottom:16px}
.liens-legaux button{background:none;border:0;color:#ddd;font:inherit;cursor:pointer;padding:4px 0;
  text-decoration:underline;text-underline-offset:3px}
.liens-legaux button:hover,.liens-legaux button:focus-visible{color:var(--jaune)}

/* ---------- Fenêtres des textes légaux ----------
   Elles s'ouvrent depuis les liens du pied de page, sans JavaScript. */
.legal{margin:auto;width:min(760px,calc(100% - 32px));max-height:85vh;overflow:auto;border:0;border-radius:16px;
  padding:40px 36px 32px;color:var(--texte);background:#fff;box-shadow:0 20px 60px rgba(0,0,0,.35);line-height:1.6}
.legal::backdrop{background:rgba(30,30,30,.6)}
.legal h2{margin-bottom:20px}
.legal h3{font-size:var(--t-texte);font-weight:600;color:var(--ardoise);margin:24px 0 8px}
.legal p,.legal li{max-width:none;margin-top:8px}
.legal ul{padding-left:20px}
.legal .maj{margin-top:28px;font-size:var(--t-petit);color:#777}
.legal .fermer{position:sticky;top:-24px;float:right;margin:-16px -12px 0 0;width:40px;height:40px;border-radius:50%;
  border:0;background:var(--fond-doux);color:var(--texte);font-size:var(--t-accent);line-height:1;cursor:pointer}
.legal .fermer:hover{background:var(--rouge);color:#fff}

/* ---------- Mobile : le cartouche passe en bas, à l'horizontale ---------- */
@media (max-width:700px){
  .bandeau{padding:12px 16px}
  .bandeau img{height:40px}
  .bandeau .devise{font-size:var(--t-petit)}
  .cartouche{top:auto;bottom:14px;right:50%;transform:translateX(50%);flex-direction:row}
  .cartouche a{width:42px;height:42px}
  .cartouche a::after{display:none}
  section{padding:56px 16px}
  .accroche{padding-top:56px;padding-bottom:56px}
  .legal{padding:32px 20px 24px}
}

/* ---------- Visiteurs qui ont désactivé les animations dans leur système ---------- */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{transition:none!important}
  .appel:hover,.appel:focus-visible{transform:none}
}
