/*
Theme Name: GSNH Nouvel Horizon
Theme URI: https://gsnh-gn.org
Author: Groupe Scolaire Nouvel Horizon
Description: Thème du Groupe Scolaire Nouvel Horizon (Conakry). Installe automatiquement les pages du site, des formulaires de pré-inscription et de contact, et une page « Coordonnées de l'école ».
Version: 1.0.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gsnh
*/

/* ---------- Base ---------- */
:root {
	--gsnh-rayon: 14px;
	--gsnh-ligne: rgba(27, 42, 107, 0.14);
}
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
.gsnh-main { margin-block-start: 0; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .wp-element-button:focus-visible {
	outline: 3px solid var(--wp--preset--color--soleil);
	outline-offset: 2px;
	border-radius: 4px;
}
img { height: auto; }
.gsnh-ic { flex: none; }

/* ---------- Bandeau du haut ---------- */
.gsnh-topbar { font-size: 0.875rem; }
.gsnh-barre {
	display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.4rem;
	max-width: var(--wp--style--global--wide-size); margin-inline: auto;
}
.gsnh-barre a { color: #DCE2F5; text-decoration: none; display: inline-flex; align-items: center; gap: 0.45rem; }
.gsnh-barre a:hover { color: #fff; }
.gsnh-barre .gsnh-ic { width: 15px; height: 15px; color: var(--wp--preset--color--soleil); }
.gsnh-barre-sep { flex: 1; }
.gsnh-barre .gsnh-barre-espace { color: #fff; font-weight: 600; }

/* ---------- En-tête ---------- */
.gsnh-header { position: sticky; top: 0; z-index: 50; }
.gsnh-entete { box-shadow: 0 1px 0 var(--gsnh-ligne); }
.gsnh-embleme { margin: 0; }
.gsnh-embleme img { display: block; }
.gsnh-marque p { margin: 0; }
.gsnh-marque-nom { font-family: var(--wp--preset--font-family--lexend); font-weight: 700; font-size: 1.3rem; line-height: 1.1; letter-spacing: -0.02em; }
.gsnh-marque-nom a { color: var(--wp--preset--color--indigo); text-decoration: none; }
.gsnh-marque-sous { font-size: 0.82rem; color: var(--wp--preset--color--gris); line-height: 1.2; }
.gsnh-nav a { text-decoration: none; color: var(--wp--preset--color--encre); }
.gsnh-nav .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--indigo); }
.gsnh-nav .wp-block-navigation__submenu-container {
	border: 1px solid var(--gsnh-ligne) !important; border-radius: 10px; padding: 0.4rem 0 !important;
	box-shadow: 0 12px 30px rgba(17, 27, 74, 0.12); min-width: 15rem !important;
}
.gsnh-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 0.5rem 1.1rem !important; }
.gsnh-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--brume); }
.gsnh-nav .current-menu-item > a, .gsnh-nav a[aria-current="page"] { color: var(--wp--preset--color--indigo); box-shadow: inset 0 -2px 0 var(--wp--preset--color--soleil); }
.gsnh-cta-entete .wp-block-button__link { padding: 0.65rem 1.2rem; font-size: 0.95rem; }
.wp-block-navigation__responsive-container.is-menu-open { padding: 1.5rem; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { color: #fff; font-size: 1.15rem; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container { border: 0 !important; box-shadow: none; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: transparent; }

/* ---------- Héros (accueil) ---------- */
.gsnh-hero, .gsnh-motif, .gsnh-bandeau {
	background-image: url("assets/img/lepi.svg");
	background-size: 96px 96px;
	position: relative;
}
.gsnh-hero { overflow: hidden; }
.gsnh-hero-lieu { color: var(--wp--preset--color--soleil); font-weight: 600; font-family: var(--wp--preset--font-family--lexend); font-size: 1rem; margin: 0; }
.gsnh-hero-titre { font-weight: 700; letter-spacing: -0.025em; line-height: 1.05; max-width: 16ch; text-wrap: balance; }
.gsnh-hero-texte { color: #DCE2F5; max-width: 36rem; line-height: 1.55; }
.gsnh-hero-visuel figure { margin: 0; }
.gsnh-hero-visuel img { width: 100%; max-width: 520px; display: block; margin-inline: auto; }
.gsnh-bouton-clair .wp-block-button__link { color: #fff !important; border: 2px solid rgba(255,255,255,0.55); background: transparent !important; }
.gsnh-bouton-clair .wp-block-button__link:hover { border-color: #fff; background: rgba(255,255,255,0.08) !important; }

/* Le soleil se lève : une seule animation, au chargement */
@media (prefers-reduced-motion: no-preference) {
	.gsnh-hero-visuel img { animation: gsnh-lever 1.6s cubic-bezier(.2,.7,.2,1) both; }
	@keyframes gsnh-lever {
		from { clip-path: inset(0 0 30% 0); transform: translateY(18%); opacity: 0; }
		to { clip-path: inset(0 0 0 0); transform: none; opacity: 1; }
	}
}

.gsnh-badges {
	margin-top: var(--wp--preset--spacing--50) !important;
	border-top: 1px solid rgba(252, 239, 199, 0.35);
	padding-top: 1.25rem;
	gap: 0.75rem 2.5rem !important;
}
.gsnh-badges p { margin: 0; color: #DCE2F5; font-size: 1rem; }
.gsnh-badges strong { color: #fff; font-family: var(--wp--preset--font-family--lexend); font-weight: 600; }

/* ---------- Parcours des cycles (ligne d'horizon) ---------- */
.gsnh-parcours { position: relative; margin-top: var(--wp--preset--spacing--50) !important; gap: 2rem !important; }
.gsnh-parcours > .wp-block-column { position: relative; padding-top: 2.2rem; }
.gsnh-parcours > .wp-block-column::before {
	content: ""; position: absolute; top: 0.45rem; left: 0; right: -2rem;
	height: 3px; background: var(--wp--preset--color--soleil);
}
.gsnh-parcours > .wp-block-column:last-child::before { right: 0; }
.gsnh-parcours > .wp-block-column::after {
	content: ""; position: absolute; top: 0; left: 0;
	width: 16px; height: 16px; border-radius: 50%;
	background: var(--wp--preset--color--indigo); box-shadow: 0 0 0 4px #fff;
}
.gsnh-parcours h3 { margin: 0 0 0.35rem; }
.gsnh-parcours h3 a { text-decoration: none; color: var(--wp--preset--color--indigo); }
.gsnh-parcours h3 a:hover { color: var(--wp--preset--color--kola); }
.gsnh-parcours-classes { font-weight: 600; color: var(--wp--preset--color--encre); margin-top: 0 !important; font-size: 0.98rem; }
.gsnh-parcours p { color: var(--wp--preset--color--gris); }
@media (max-width: 781px) {
	.gsnh-parcours > .wp-block-column { padding-top: 0; padding-left: 2.2rem; }
	.gsnh-parcours > .wp-block-column::before { top: 0; bottom: -2rem; left: 6.5px; right: auto; width: 3px; height: auto; }
	.gsnh-parcours > .wp-block-column:last-child::before { bottom: 0; }
	.gsnh-parcours > .wp-block-column::after { top: 0.3rem; }
}

/* ---------- Atouts ---------- */
.gsnh-atouts { gap: 2rem 2.5rem !important; }
.gsnh-atouts h3 { margin: 0 0 0.4rem; padding-top: 0.9rem; border-top: 3px solid var(--wp--preset--color--indigo); font-size: 1.15rem; }
.gsnh-atouts p { margin: 0; color: var(--wp--preset--color--gris); }

/* ---------- Mot du directeur ---------- */
.gsnh-directeur figure { margin: 0; }
.gsnh-citation { border-left: 4px solid var(--wp--preset--color--soleil); padding-left: 1.5rem; margin: 1.5rem 0; }
.gsnh-citation p { font-family: var(--wp--preset--font-family--lexend); font-size: clamp(1.2rem, 2.2vw, 1.55rem); line-height: 1.45; color: var(--wp--preset--color--indigo); font-weight: 400; }
.gsnh-citation cite { font-style: normal; font-size: 0.95rem; color: var(--wp--preset--color--gris); }

/* ---------- Étapes d'inscription ---------- */
.gsnh-etapes { counter-reset: etape; gap: 2rem !important; margin-top: var(--wp--preset--spacing--40) !important; }
.gsnh-etapes > .wp-block-column { counter-increment: etape; border-top: 1px solid rgba(252, 239, 199, 0.35); padding-top: 1rem; }
.gsnh-etapes > .wp-block-column h3::before {
	content: counter(etape); display: inline-grid; place-items: center;
	width: 1.9rem; height: 1.9rem; margin-right: 0.6rem; border-radius: 50%;
	background: var(--wp--preset--color--soleil); color: var(--wp--preset--color--indigo-nuit);
	font-size: 1rem; vertical-align: 0.1em;
}
.gsnh-etapes h3 { font-size: 1.15rem; margin: 0 0 0.4rem; }
.gsnh-etapes p { color: #DCE2F5; margin: 0; }

/* ---------- Actualités ---------- */
.gsnh-actu {
	height: 100%; background: #fff; border: 1px solid var(--gsnh-ligne); border-radius: var(--gsnh-rayon); overflow: hidden;
	display: flex; flex-direction: column;
}
.gsnh-actu .wp-block-post-featured-image { margin: 0; }
.gsnh-actu-corps { padding: 1.25rem 1.4rem 1.5rem; border-top: 4px solid var(--wp--preset--color--soleil); }
.gsnh-actu .wp-block-post-featured-image + .gsnh-actu-corps { border-top: 0; }
.gsnh-actu-date { font-size: 0.875rem; color: var(--wp--preset--color--gris); }
.gsnh-actu h3 { font-size: 1.2rem; margin: 0.3rem 0 0.5rem; }
.gsnh-actu h3 a { text-decoration: none; color: var(--wp--preset--color--indigo); }
.gsnh-actu h3 a:hover { text-decoration: underline; }
.gsnh-actu .wp-block-post-excerpt { color: var(--wp--preset--color--gris); font-size: 1rem; margin: 0; }
.gsnh-actu .wp-block-post-excerpt__excerpt { margin: 0; }

/* ---------- Bande d'appel ---------- */
.gsnh-appel h2 { margin: 0; max-width: 28ch; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.gsnh-appel-actions { margin: 0; }
.gsnh-bouton-wa {
	display: inline-flex; align-items: center; gap: 0.55rem;
	background: var(--wp--preset--color--kola); color: #fff !important; text-decoration: none !important;
	padding: 0.8rem 1.4rem; border-radius: 999px;
	font-family: var(--wp--preset--font-family--lexend); font-weight: 600; font-size: 1rem;
}
.gsnh-bouton-wa:hover { background: #17644A; }
.gsnh-bouton-wa .gsnh-ic { width: 20px; height: 20px; }

/* ---------- Bandeau des pages intérieures ---------- */
.gsnh-bandeau h1 { margin: 0.4rem 0 0; max-width: 24ch; text-wrap: balance; }
.gsnh-chapeau, .gsnh-bandeau .wp-block-post-excerpt { color: #DCE2F5; font-size: 1.2rem; max-width: 42rem; margin-top: 0.75rem; }
.gsnh-bandeau .wp-block-post-excerpt__excerpt { margin: 0; }
.gsnh-fil { font-size: 0.9rem; color: #B9C2E3; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.gsnh-fil a { color: #DCE2F5; text-decoration: none; }
.gsnh-fil a:hover { text-decoration: underline; color: #fff; }
.gsnh-fil-sep { color: var(--wp--preset--color--soleil); }
.gsnh-bandeau .wp-block-query-title { color: #fff; margin: 0; }

/* ---------- Contenu des pages ---------- */
.gsnh-contenu h2 { margin-top: 2.5rem; }
.gsnh-contenu > h2:first-child, .gsnh-contenu > .gsnh-encadre:first-child { margin-top: 0; }
.gsnh-encadre {
	background: var(--wp--preset--color--brume); border-radius: var(--gsnh-rayon);
	padding: 1.4rem 1.6rem; border-left: 5px solid var(--wp--preset--color--soleil);
}
.gsnh-encadre-titre { font-size: 1.15rem !important; margin: 0 0 0.5rem !important; }
.gsnh-encadre ul { margin: 0; padding-left: 1.2rem; }
.gsnh-encadre p { margin: 0; }
.gsnh-liste-etapes { counter-reset: e; list-style: none; padding-left: 0; }
.gsnh-liste-etapes > li { counter-increment: e; position: relative; padding-left: 3rem; margin-bottom: 1rem; }
.gsnh-liste-etapes > li::before {
	content: counter(e); position: absolute; left: 0; top: 0;
	width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center;
	background: var(--wp--preset--color--indigo); color: #fff; font-family: var(--wp--preset--font-family--lexend); font-weight: 600; font-size: 0.95rem;
}
.gsnh-signature { margin-top: 0.8rem; color: var(--wp--preset--color--gris); }

/* Tableaux */
.gsnh-tableau table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.gsnh-tableau th { background: var(--wp--preset--color--indigo); color: #fff; font-family: var(--wp--preset--font-family--lexend); font-weight: 500; font-size: 0.9rem; text-align: left; line-height: 1.3; }
.gsnh-tableau th, .gsnh-tableau td { border: 0; border-bottom: 1px solid var(--gsnh-ligne); padding: 0.7rem 0.85rem; }
.gsnh-tableau tbody tr:nth-child(even) td { background: #F7F8FC; }
.gsnh-tableau-frais td:not(:first-child), .gsnh-tableau-frais th:not(:first-child) { text-align: right; white-space: nowrap; }
.gsnh-tableau figcaption { font-size: 0.875rem; color: var(--wp--preset--color--gris); text-align: left; }
@media (max-width: 640px) {
	.gsnh-tableau { overflow-x: auto; }
	.gsnh-tableau-frais table { min-width: 34rem; }
}

/* Galerie */
.gsnh-galerie img { border-radius: 10px; }

/* Coordonnées */
.gsnh-coord { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 0.75rem; }
.gsnh-coord li { display: flex; gap: 0.7rem; align-items: flex-start; }
.gsnh-coord .gsnh-ic { margin-top: 0.25rem; color: var(--wp--preset--color--kola); }
.gsnh-carte { border-radius: var(--gsnh-rayon); overflow: hidden; border: 1px solid var(--gsnh-ligne); }
.gsnh-carte iframe { display: block; width: 100%; height: 380px; border: 0; }

/* ---------- Formulaires ---------- */
.gsnh-form {
	display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem;
	background: var(--wp--preset--color--brume); padding: clamp(1.25rem, 3vw, 2rem); border-radius: var(--gsnh-rayon);
}
.gsnh-form p { margin: 0; }
.gsnh-form .gsnh-plein { grid-column: 1 / -1; }
.gsnh-form label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 0.3rem; color: var(--wp--preset--color--encre); }
.gsnh-form label span { color: #B42318; }
.gsnh-form input, .gsnh-form select, .gsnh-form textarea {
	width: 100%; box-sizing: border-box; font: inherit; font-size: 1rem;
	padding: 0.7rem 0.85rem; border: 1px solid #C5CBE0; border-radius: 8px; background: #fff; color: var(--wp--preset--color--encre);
}
.gsnh-form input:focus, .gsnh-form select:focus, .gsnh-form textarea:focus { border-color: var(--wp--preset--color--indigo); }
.gsnh-form-pied { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.gsnh-form-pied span { font-size: 0.875rem; color: var(--wp--preset--color--gris); }
.gsnh-form button { cursor: pointer; border: 0; }
.gsnh-hp { position: absolute !important; left: -9999px !important; }
.gsnh-alerte { padding: 1rem 1.25rem; border-radius: 10px; margin-bottom: 1rem; }
.gsnh-alerte-ok { background: #E3F4EC; color: #0F5132; border-left: 5px solid var(--wp--preset--color--kola); }
.gsnh-alerte-err { background: #FDECEA; color: #7A1C14; border-left: 5px solid #B42318; }
@media (max-width: 640px) { .gsnh-form { grid-template-columns: 1fr; } }

/* ---------- Article ---------- */
.gsnh-meta { font-size: 0.9rem; color: var(--wp--preset--color--gris); gap: 0.75rem !important; }
.gsnh-meta a { color: var(--wp--preset--color--kola); text-decoration: none; }

/* ---------- Pied de page ---------- */
.gsnh-pied { font-size: 0.98rem; }
.gsnh-pied a { color: #DCE2F5; text-decoration: none; }
.gsnh-pied a:hover { color: #fff; text-decoration: underline; }
.gsnh-pied figure { margin: 0; }
.gsnh-pied-nom { font-family: var(--wp--preset--font-family--lexend); font-weight: 600; font-size: 1.15rem; line-height: 1.2; margin: 0; color: #fff; }
.gsnh-pied-devise { color: #B9C2E3; max-width: 26rem; }
.gsnh-pied-titre { color: var(--wp--preset--color--soleil) !important; font-size: 1rem !important; font-weight: 600; margin-bottom: 0.9rem; }
.gsnh-pied-liens { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.gsnh-pied .gsnh-coord { color: #DCE2F5; }
.gsnh-pied .gsnh-coord .gsnh-ic { color: var(--wp--preset--color--soleil); }
.gsnh-reseaux { display: flex; gap: 0.6rem; }
.gsnh-reseaux a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,0.08); }
.gsnh-reseaux a:hover { background: var(--wp--preset--color--soleil); color: var(--wp--preset--color--indigo-nuit); }
.gsnh-pied-bas { border-top: 1px solid rgba(255,255,255,0.12); margin-top: var(--wp--preset--spacing--50) !important; padding-top: 1.25rem; font-size: 0.875rem; color: #9AA4CC; }
.gsnh-pied-bas p { margin: 0; }

/* ---------- Petits écrans ---------- */
@media (max-width: 960px) {
	.gsnh-barre-mail { display: none !important; }
	.gsnh-cta-entete { display: none !important; }
}
@media (max-width: 781px) {
	.gsnh-topbar { font-size: 0.82rem; }
	.gsnh-barre { gap: 0.3rem 1rem; }
	.gsnh-barre-sep { display: none; }
	.gsnh-hero-visuel { order: -1; }
	.gsnh-hero-visuel img { max-width: 300px; }
	.gsnh-marque-sous { display: none; }
}
