/*
Theme Name:   ONPG — Thème de la plateforme
Theme URI:    https://onpg.rm-medias.com/
Description:  Thème léger conçu pour le plugin « ONPG — Plateforme numérique ». Intègre nativement l'en-tête (logo, contact, réseaux, bouton signalement, menu) et le pied de page de la charte ONPG, modifiables sans Elementor Pro (Apparence > Menus et Personnaliser), et remplaçables par le Theme Builder d'Elementor Pro (emplacements « En-tête » et « Pied de page » supportés). Compatible avec les modèles de page Elementor « Pleine largeur » et « Canevas ».
Author:       Prestataire ONPG
Version:      1.2.0
Requires at least: 6.0
Requires PHP: 7.4
License:      GPL-2.0-or-later
Text Domain:  onpg-theme
*/

:root{
  --onpg-vert:#1DA34C; --onpg-vert-fonce:#16803B; --onpg-vert-clair:#E4F5EA;
  --onpg-orange:#E8630F; --onpg-violet:#6B4E76; --onpg-bleu:#10233F;
  --onpg-gris:#6E6E72; --fond-doux:#F5F6F4; --bordure:#E2E3E0; --encre:#17181C; --encre-douce:#56585C;
  --police-titre:'Manrope','Segoe UI',system-ui,sans-serif; --police-texte:'Source Sans 3','Segoe UI',system-ui,sans-serif;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:var(--police-texte);color:var(--encre);background:#fff;-webkit-font-smoothing:antialiased;
  display:flex;flex-direction:column;min-height:100vh}
/* Le pied de page reste en bas même sur une page courte (plus de footer « flottant »). */
.onpg-site-contenu{flex:1 0 auto;width:100%}
.onpg-pied,.onpg-entete{flex-shrink:0;width:100%}
img{max-width:100%;height:auto}
a{color:inherit}
.onpg-conteneur{max-width:1180px;margin:0 auto;padding:0 24px;width:100%}
.screen-reader-text{position:absolute;left:-9999px}
.onpg-saut{position:absolute;left:-9999px;top:0;background:#fff;color:#000;padding:10px 16px;z-index:100000}
.onpg-saut:focus{left:8px;top:8px}

/* ---------- En-tête ---------- */
.onpg-entete{background:#fff;border-bottom:1px solid var(--bordure);position:relative;z-index:50}
.onpg-barre-marque .onpg-conteneur{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;padding-top:14px;padding-bottom:14px}
.onpg-marque{display:flex;align-items:center;gap:12px;text-decoration:none}
.onpg-marque{gap:14px}
.onpg-marque img.onpg-logo{height:46px;width:auto;max-width:120px;object-fit:contain}
.onpg-marque img.onpg-armoiries{height:52px;width:auto;max-width:70px;object-fit:contain}
.onpg-marque .onpg-separateur{width:1px;height:40px;background:var(--bordure)}
.onpg-marque strong{display:block;font-family:var(--police-titre);font-weight:800;font-size:1.15rem;line-height:1.1}
.onpg-marque span{display:block;font-size:.75rem;color:var(--encre-douce);max-width:360px;line-height:1.3}
.onpg-contact-haut{display:flex;align-items:center;gap:18px;flex-wrap:wrap;font-size:.86rem;color:var(--encre-douce)}
.onpg-contact-haut a{text-decoration:none}
.onpg-reseaux{display:flex;gap:8px}
.onpg-reseaux a{width:32px;height:32px;border-radius:50%;background:var(--fond-doux);color:var(--encre-douce);display:inline-flex;align-items:center;justify-content:center}
.onpg-reseaux a:hover{background:var(--onpg-vert);color:#fff}
.onpg-reseaux svg{width:15px;height:15px;fill:currentColor}
.onpg-bouton-signalement{background:var(--onpg-orange);color:#fff;text-decoration:none;font-weight:700;font-size:.86rem;padding:10px 18px;border-radius:30px;display:inline-flex;gap:8px;align-items:center}
.onpg-bouton-signalement:hover{background:#C24E08}
.onpg-nav{border-top:1px solid var(--bordure)}
.onpg-nav .onpg-conteneur{display:flex;align-items:center;justify-content:space-between}
.onpg-menu,.onpg-menu ul{list-style:none;margin:0;padding:0}
.onpg-menu{display:flex;flex-wrap:wrap;gap:4px}
.onpg-menu li{position:relative}
.onpg-menu > li > a{display:block;padding:14px 14px;font-family:var(--police-titre);font-weight:600;font-size:.9rem;text-decoration:none;color:var(--encre);border-bottom:3px solid transparent}
.onpg-menu > li > a:hover{color:var(--onpg-vert)}
.onpg-menu > li.current-menu-item > a,.onpg-menu > li.current-menu-ancestor > a,.onpg-menu > li.current_page_item > a{color:var(--onpg-vert);border-bottom-color:var(--onpg-vert)}
.onpg-menu .sub-menu{display:none;position:absolute;left:0;top:100%;min-width:220px;background:#fff;border:1px solid var(--bordure);border-radius:10px;box-shadow:0 10px 28px rgba(0,0,0,.12);padding:8px 0;z-index:60}
.onpg-menu li:hover > .sub-menu,.onpg-menu li:focus-within > .sub-menu{display:block}
.onpg-menu .sub-menu a{display:block;padding:9px 16px;text-decoration:none;font-size:.88rem}
.onpg-menu .sub-menu a:hover{background:var(--fond-doux);color:var(--onpg-vert)}
.onpg-burger{display:none;background:none;border:0;font-size:1.7rem;line-height:1;padding:10px 0;cursor:pointer;color:var(--encre)}

/* ---------- Pied de page ---------- */
.onpg-pied{background:var(--onpg-bleu);color:#C7CBD3;border-top:5px solid var(--onpg-vert);margin-top:0}
.onpg-pied-grille{display:grid;grid-template-columns:1.4fr 1fr 1fr 1.2fr;gap:36px;padding-top:34px;padding-bottom:26px}
.onpg-pied h2{font-family:var(--police-titre);font-size:.95rem;color:#fff;margin:0 0 12px;font-weight:700}
.onpg-pied h2.onpg-pied-marque{color:var(--onpg-orange);font-size:1.15rem;font-weight:800}
.onpg-pied p{font-size:.86rem;line-height:1.6;margin:0 0 10px;color:#C7CBD3}
.onpg-pied ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.onpg-pied a{color:#C7CBD3;text-decoration:none;font-size:.88rem}
.onpg-pied a:hover{color:#fff;text-decoration:underline}
.onpg-pied .onpg-reseaux a{background:#23324A;color:#fff}
.onpg-pied .onpg-reseaux a:hover{background:var(--onpg-vert)}
.onpg-pied .onpg-bouton-signalement{color:#fff;margin:4px 0 14px}
.onpg-pied-bas{border-top:1px solid #23324A;padding:14px 0;text-align:center;font-size:.78rem;color:#8C93A3}

/* ---------- Contenu courant (articles, pages sans Elementor) ---------- */
.onpg-contenu{max-width:860px;margin:0 auto;padding:36px 24px;line-height:1.7}
.onpg-contenu h1{font-family:var(--police-titre);font-size:2rem;margin:0 0 18px}
.onpg-contenu .meta{color:var(--onpg-gris);font-size:.85rem;margin-bottom:20px}

@media(max-width:900px){
  .onpg-burger{display:block}
  .onpg-nav .onpg-conteneur{flex-wrap:wrap}
  .onpg-menu{display:none;flex-direction:column;width:100%;padding-bottom:10px}
  .onpg-nav.ouvert .onpg-menu{display:flex}
  .onpg-menu .sub-menu{display:block;position:static;border:0;box-shadow:none;padding:0 0 0 14px}
  .onpg-pied-grille{grid-template-columns:1fr 1fr}
  .onpg-marque span{display:none}
}
@media(max-width:560px){.onpg-pied-grille{grid-template-columns:1fr}.onpg-contact-haut{display:none}}

/* ---------- PWA : bouton « Installer l'application » ---------- */
.onpg-pwa-installer{ position:fixed; left:50%; bottom:18px; transform:translateX(-50%); z-index:9998; display:flex; align-items:stretch; border-radius:999px; overflow:hidden; box-shadow:0 8px 24px rgba(16,35,63,.28); }
.onpg-pwa-installer button{ border:0; cursor:pointer; font:inherit; font-weight:700; font-size:.92rem; }
.onpg-pwa-installer__go{ background:#16803B; color:#fff; padding:12px 18px 12px 22px; }
.onpg-pwa-installer__go:hover{ background:#10672f; }
.onpg-pwa-installer__x{ background:#10233F; color:#fff; padding:0 16px; font-size:1.2rem; line-height:1; }
@media print{ .onpg-pwa-installer{ display:none; } }
