/* ============================================================
   TMZ Centre — en-tete et pied de page de cours.tmzcentre.ma
   Meme systeme que tmzcentre.ma (source : livrables/sites-web/tmz-centre-site/assets/site.css) :
   fond blanc, texte navy du logo #1C3A74, vert pour les actions.
   Toutes les regles sont scopees sous #tmz-header / #tmz-footer /
   .tmz-fab pour ne rien casser dans Tutor LMS, WooCommerce ou Astra.
   ============================================================ */

/* --- Jetons d'identite : memes valeurs que tmzcentre.ma (assets/site.css). Une seule famille de neutres chauds. --- */
:root{--cream:#F3F0E8;--mist:#F6F5F2;--paper:#FFFFFF;--ink:#0F172A;--ink-2:#334155;--ink-3:#475569;--line:rgba(15,23,42,.12);--blue-ink:#1C3A74;--blue-ink-deep:#15305F;--green:#179272;--green-ink:#0F7A5E;--btn-green-hover:#0B6650;}

/* --- Chrome natif Astra, remplace par le notre --- */
#masthead,
#colophon,
.ast-mobile-popup-drawer,
#ast-mobile-popup,
.ast-mobile-header-wrap{display:none !important;}

/* Titre/slogan du site (identite Astra) : notre logo est deja dans #tmz-header,
   ce texte ne doit jamais s'afficher nulle part, quel que soit l'endroit ou
   Astra ou un plugin (ex. Tutor LMS, dans sa propre sidebar) l'appelle.
   Constat du 2026-09-13 : superposition illisible sur le tableau de bord
   Tutor, hors de #masthead (donc non couverte par la regle ci-dessus). */
.site-title,
.site-description,
.ast-site-title,
.ast-site-identity .ast-site-title-wrap,
.ast-site-identity .site-description{display:none !important;}

/* --- Fond et typographie des pages, comme le site vitrine --- */
body.wp-child-theme-astra-child-tmz{background:var(--mist);color:var(--ink-2);font-family:'Plus Jakarta Sans','Inter',system-ui,sans-serif;-webkit-font-smoothing:antialiased;}
body.wp-child-theme-astra-child-tmz .entry-content h1,
body.wp-child-theme-astra-child-tmz .entry-content h2,
body.wp-child-theme-astra-child-tmz .entry-content h3,
body.wp-child-theme-astra-child-tmz .woocommerce h2,
body.wp-child-theme-astra-child-tmz .woocommerce h3{font-family:'Bricolage Grotesque','Plus Jakarta Sans',system-ui,sans-serif;letter-spacing:-0.02em;color:#0F172A;}
body.wp-child-theme-astra-child-tmz.ast-separate-container .ast-article-single,
body.wp-child-theme-astra-child-tmz.ast-separate-container .ast-article-post{border-radius:16px;border:1px solid var(--line);}
body.wp-child-theme-astra-child-tmz a:not(.btn):not(.tutor-btn):not(.navlink):not(.foot-link):not(.foot-wa):not(.tmz-fab):not(.icon-btn){color:var(--blue-ink);}

#tmz-header,
#tmz-footer,
.tmz-fab{font-family:'Plus Jakarta Sans','Inter',system-ui,sans-serif;-webkit-font-smoothing:antialiased;box-sizing:border-box;}
#tmz-header *,
#tmz-footer *{box-sizing:border-box;}
#tmz-header a,
#tmz-footer a,
.tmz-fab{text-decoration:none;}

/* --- Boutons (meme logique que .btn du site vitrine) --- */
#tmz-header .btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;border-radius:12px;font-weight:700;font-size:13px;padding:10px 18px;line-height:1.2;cursor:pointer;font-family:inherit;transition:background .16s ease,border-color .16s ease,color .16s ease,transform .16s cubic-bezier(.23,1,.32,1);}
@media (hover:hover) and (pointer:fine){#tmz-header .btn:hover{transform:translateY(-2px);}}
#tmz-header .btn:active{transform:scale(.97);}
#tmz-header .btn-green{background:#14866A;color:#FFFFFF;border:1px solid #14866A;}
#tmz-header .btn-green:hover{background:#0F7A5E;border-color:#0F7A5E;color:#FFFFFF;}
#tmz-header .btn-ghost{background:transparent;border:1px solid rgba(15,23,42,0.22);color:#0F172A;}
#tmz-header .btn-ghost:hover{border-color:#179272;background:rgba(23,146,114,.08);color:#0F172A;}
#tmz-header .btn .fa-whatsapp{font-size:14px;}
#tmz-header .icon-btn{width:40px;height:40px;flex-shrink:0;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;border:1px solid rgba(15,23,42,0.22);color:#0F172A;font-size:18px;transition:border-color .16s ease,color .16s ease,background .16s ease;}
#tmz-header .icon-btn:hover{border-color:#179272;color:#0F7A5E;background:rgba(23,146,114,.08);}

/* --- En-tete (clair, comme tmzcentre.ma) --- */
#tmz-header{position:fixed;top:0;left:0;right:0;z-index:9999;background:rgba(255,255,255,0.92);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-bottom:1px solid rgba(15,23,42,0.12);transition:background .25s ease,box-shadow .25s ease;}
body.admin-bar #tmz-header{top:32px;}
#tmz-header.scrolled{background:rgba(255,255,255,0.98);box-shadow:0 10px 30px -22px rgba(15,23,42,.35);}
#tmz-header .hdr-inner{max-width:1180px;margin:0 auto;padding:0 24px;height:76px;display:flex;align-items:center;justify-content:space-between;gap:16px;transition:height .25s ease;}
#tmz-header.scrolled .hdr-inner{height:60px;}
#tmz-header .hdr-logo{display:block;height:52px;width:auto;max-width:none;object-fit:contain;transition:height .25s ease;}
/* Logo complet si la place le permet ; version sans sous-titre quand l'en-tete se reduit ou sur mobile (sous-titre illisible < 160 px). */
#tmz-header .hdr-logo-compact{display:none;height:40px;}
#tmz-header.scrolled .hdr-logo-full{display:none;}
#tmz-header.scrolled .hdr-logo-compact{display:block;height:36px;}
@media (max-width:979px){#tmz-header .hdr-logo-full{display:none;}#tmz-header .hdr-logo-compact{display:block;}}
#tmz-header .nav-desktop{display:flex;align-items:center;gap:28px;font-size:14px;font-weight:600;}
#tmz-header .navlink{position:relative;padding:6px 0;color:#334155;transition:color .18s ease;}
#tmz-header .navlink:hover{color:#0F7A5E;}
#tmz-header .navlink::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;border-radius:2px;background:#179272;transform:scaleX(0);transform-origin:left center;transition:transform .22s cubic-bezier(.23,1,.32,1);}
@media (hover:hover) and (pointer:fine){#tmz-header .navlink:hover::after{transform:scaleX(1);}}
#tmz-header .nav-cta{display:flex;align-items:center;gap:10px;flex-shrink:0;}
#tmz-header .burger{display:none;width:46px;height:46px;border-radius:12px;border:1px solid rgba(15,23,42,0.12);background:#FFFFFF;color:#0F172A;font-size:17px;cursor:pointer;align-items:center;justify-content:center;}
#tmz-header .burger:hover{background:var(--mist);}
#tmz-header .nav-mobile{display:none;border-top:1px solid rgba(15,23,42,0.12);padding:14px 24px 24px;flex-direction:column;gap:4px;background:rgba(255,255,255,0.99);box-shadow:0 24px 40px -28px rgba(15,23,42,.35);max-height:calc(100vh - 76px);overflow-y:auto;overscroll-behavior:contain;}
#tmz-header .nav-mobile.open{display:flex;}
#tmz-header .nav-mobile > a{color:#0F172A;font-size:15px;font-weight:600;padding:14px 4px;border-bottom:1px solid rgba(15,23,42,0.12);}
#tmz-header .nav-mobile > a:hover{color:#0F7A5E;}
#tmz-header .nav-mobile-cta{display:flex;flex-direction:column;gap:10px;margin-top:16px;}
#tmz-header .nav-mobile-cta .btn{padding:14px;font-size:14px;}
.tmz-header-spacer{height:76px;}

@media (max-width:979px){
	#tmz-header .nav-desktop,
	#tmz-header .nav-cta{display:none;}
	#tmz-header .burger{display:flex;}
}
@media (max-width:782px){
	body.admin-bar #tmz-header{top:46px;}
}
/* Sous 600px la barre d'admin WordPress defile avec la page : garder un
   decalage de 46px laissait voir le contenu au-dessus de l'en-tete. */
@media (max-width:600px){
	body.admin-bar #tmz-header{top:0;}
}

/* Espace eleve : bouton "Become an Instructor" non pertinent pour les eleves. */
.tutor-profile-switch-button[href*="inscription-formateur"]{display:none !important;}

/* --- Pied de page (clair) --- */
#tmz-footer{background:var(--mist);color:#0F172A;padding:64px 24px 32px;border-top:1px solid rgba(15,23,42,0.12);margin-top:64px;}
#tmz-footer .foot-grid{max-width:1180px;margin:0 auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:40px;padding-bottom:40px;border-bottom:1px solid rgba(15,23,42,0.12);}
#tmz-footer .foot-logo{display:block;height:54px;width:auto;max-width:none;object-fit:contain;margin-bottom:18px;}
#tmz-footer .foot-tagline{color:#0F172A;font-size:14px;font-weight:600;margin:0 0 4px;}
#tmz-footer .foot-ar{font-family:'Cairo',sans-serif;color:#1C3A74;font-size:15px;margin:0 0 14px;text-align:left;}
#tmz-footer .foot-desc{color:#475569;font-size:13px;line-height:1.7;margin:0 0 14px;max-width:280px;}
#tmz-footer .foot-title{display:block;font-size:13px;font-weight:700;color:#0F172A;margin-bottom:16px;}
#tmz-footer .foot-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:0;font-size:14px;}
#tmz-footer .foot-link{display:inline-flex;align-items:center;min-height:44px;color:#475569;transition:color .18s ease;}
#tmz-footer .foot-link:hover{color:#0F7A5E;}
#tmz-footer .foot-wa{min-height:44px;display:inline-flex;align-items:center;gap:9px;font-size:14px;font-weight:600;color:#0F172A;}
#tmz-footer .foot-wa:hover{color:#0F7A5E;}
#tmz-footer .foot-ig{min-height:44px;display:flex;align-items:center;gap:9px;font-size:14px;font-weight:600;margin-top:12px;}
#tmz-footer .foot-bottom{max-width:1180px;margin:0 auto;padding-top:24px;display:flex;flex-wrap:wrap;gap:10px;justify-content:space-between;font-size:13px;color:#475569;}
#tmz-footer .foot-bottom p{margin:0;}

/* --- Bouton WhatsApp flottant --- */
.tmz-fab{position:fixed;bottom:24px;right:24px;z-index:9998;width:56px;height:56px;border-radius:50%;background:#14866A;color:#FFFFFF;display:flex;align-items:center;justify-content:center;font-size:26px;border:2px solid #FFFFFF;box-shadow:0 14px 30px -10px rgba(23,146,114,.8);transition:background .18s ease,transform .16s cubic-bezier(.23,1,.32,1);}
.tmz-fab:hover{background:#0F7A5E;color:#FFFFFF;transform:translateY(-3px);}

/* --- Focus clavier et mouvement reduit --- */
#tmz-header a:focus-visible,
#tmz-header button:focus-visible,
#tmz-footer a:focus-visible,
.tmz-fab:focus-visible{outline:2px solid #1C3A74;outline-offset:3px;}

@media (prefers-reduced-motion: reduce){
	#tmz-header,
	#tmz-header *,
	#tmz-footer *,
	.tmz-fab{transition:none !important;}
	#tmz-header .btn:hover,
	.tmz-fab:hover{transform:none;}
}

/* --- Identite commune : focus visible partout, polices de la charte dans les champs, cibles tactiles --- */
body.wp-child-theme-astra-child-tmz :where(a,button,input,select,textarea,summary,[tabindex]):focus-visible{outline:2px solid var(--blue-ink);outline-offset:3px;}
body.wp-child-theme-astra-child-tmz :where(button,input,select,textarea){font-family:inherit;}
body.wp-child-theme-astra-child-tmz #tutor-login-form :where(input[type="text"],input[type="password"],input[type="email"],button){min-height:44px;}
body.wp-child-theme-astra-child-tmz #tutor-login-form a{display:inline-block;padding:11px 0;}
#ast-scroll-top:focus-visible{outline:2px solid var(--blue-ink);outline-offset:3px;}
@media (max-width:921px){
	/* Le bouton WhatsApp flottant ne doit pas masquer le dernier lien du pied de page */
	#tmz-footer{padding-bottom:96px;}
}

/* --- Voile derriere le menu mobile (comme tmzcentre.ma) --- */
.tmz-nav-scrim{position:fixed;inset:0;z-index:40;background:rgba(15,23,42,.38);opacity:0;visibility:hidden;transition:opacity .2s var(--ease-out,ease),visibility 0s linear .2s;}
.tmz-nav-scrim.open{opacity:1;visibility:visible;transition:opacity .2s var(--ease-out,ease),visibility 0s;}
@media (min-width:922px){.tmz-nav-scrim{display:none;}}
@media (prefers-reduced-motion:reduce){.tmz-nav-scrim,.tmz-nav-scrim.open{transition:none;}}

/* --- Boutons d'acces (banque QCM, dissertation) : le vert clair #179272 ne tient que 3,9:1 avec du texte blanc.
   Le style est ecrit en ligne dans le plugin ; on le corrige ici avec le vert de texte --green-ink (5,3:1). --- */
body.wp-child-theme-astra-child-tmz button[type="submit"][style*="#179272"]{background:var(--green-ink) !important;min-height:44px;}
body.wp-child-theme-astra-child-tmz button[type="submit"][style*="#179272"]:hover{background:var(--btn-green-hover) !important;}

/* --- Carte « demande d'acces » (style en ligne dans le plugin) : neutres chauds de la charte --- */
body.wp-child-theme-astra-child-tmz #demande-acces{background:var(--mist) !important;border-color:var(--line) !important;}
body.wp-child-theme-astra-child-tmz #demande-acces [style*="#64748B"]{color:var(--ink-3) !important;}
