/*
Theme Name: Horizon Numérique – Portail
Theme URI: https://horizon-numerique.ch
Author: Studio Horizon Numérique
Description: Thème du portail du studio Horizon Numérique : présentation des projets (Mimi la marmotte, Apprendre, la boutique), des ateliers et du formateur. Thème à blocs, sans extension nécessaire.
Version: 1.0.1
Requires at least: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: horizon-portail
*/

html { scroll-behavior: smooth; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
section[id] { scroll-margin-top: 90px; }
.hn-main > * + * { margin-block-start: 0; }

/* En-tête */
.hn-header { background: #fff; border-bottom: 1px solid #DDE2EA; padding-top: 14px; padding-bottom: 14px; }
.hn-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #14213D; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.hn-logo img { display: block; }
.hn-nav { font-weight: 500; gap: 4px 6px; }
.hn-nav .wp-block-navigation-item__content { padding: 10px 12px; }
.hn-nav .hn-nav-contact > .wp-block-navigation-item__content { background: #14213D; color: #fff; border-radius: 8px; padding: 10px 18px; font-weight: 600; }
.hn-nav .hn-nav-contact > .wp-block-navigation-item__content:hover { background: #24365F; color: #fff; }
.hn-nav .wp-block-navigation__responsive-container.is-menu-open .hn-nav-contact > .wp-block-navigation-item__content { background: none; color: #14213D; padding: 10px 12px; }

/* Éléments communs */
.hn-kicker { margin: 0 0 10px; font-size: 14px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #5A6780; }
.hn-kicker-soleil { color: #F2A541; }
.hn-section { padding-top: 88px; padding-bottom: 88px; }
.hn-section-blanche { background: #fff; border-top: 1px solid #DDE2EA; border-bottom: 1px solid #DDE2EA; }
.hn-entete-section { margin-bottom: 40px; }
.hn-entete-section h2 { margin: 0; max-width: 760px; }
.hn-intro { margin: 16px 0 0; color: #4A566D; font-size: 17px; }
.hn-carte-texte { color: #4A566D; margin: 0; }
.hn-badge { align-self: flex-start; display: inline-block; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; margin: 0; }
.hn-badge.hn-mimi { background: #FBE9E7; color: #8E241D; }
.hn-badge.hn-apprendre { background: #FFF1DC; color: #7A4A06; }
.hn-badge.hn-boutique { background: #E8ECF3; color: #24365F; }
.hn-badge.hn-gris { background: #EEF1F6; color: #4A566D; }

/* Boutons */
.wp-block-button.is-style-soleil .wp-block-button__link { background: #F2A541; color: #14213D; }
.wp-block-button.is-style-soleil .wp-block-button__link:hover { background: #F5B865; }
.wp-block-button.is-style-contour .wp-block-button__link { background: transparent; color: #14213D; border: 1px solid #B8C2D3; padding: 14px 23px; }
.wp-block-button.is-style-contour .wp-block-button__link:hover { background: #F4F6F9; }
.wp-block-button.is-style-contour-clair .wp-block-button__link { background: transparent; color: #fff; border: 1px solid #8A9AB5; padding: 14px 23px; }
.wp-block-button.is-style-contour-clair .wp-block-button__link:hover { background: #24365F; }
.wp-block-button .wp-block-button__link:hover { background: #24365F; color: #fff; }
.wp-block-button.is-style-soleil .wp-block-button__link:hover { color: #14213D; }
.wp-block-button.is-style-contour .wp-block-button__link:hover { color: #14213D; }

/* Héros */
.hn-hero { background: #14213D; color: #fff; padding-top: 88px; overflow: hidden; }
.hn-hero-grille { gap: 48px; }
.hn-hero-texte { flex: 1 1 460px; min-width: 0; padding-bottom: 80px; }
.hn-hero-texte h1 { color: #fff; margin: 0 0 24px; letter-spacing: -0.02em; line-height: 1.04; }
.hn-chapo { font-size: 19px; color: #DCE3EE; max-width: 540px; margin: 0 0 32px; }
.hn-hero .wp-block-buttons, .hn-section-contact .wp-block-buttons { gap: 12px; }
.hn-hero-grille > .wp-block-html, .hn-hero-grille > .hn-horizon { flex: 1 1 420px; min-width: 0; }
.hn-horizon { position: relative; height: 380px; flex: 1 1 420px; min-width: 0; }
.hn-soleil, .hn-onde { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); box-sizing: border-box; }
.hn-soleil { width: 300px; height: 150px; border-radius: 150px 150px 0 0; background: #F2A541; }
.hn-onde-1 { width: 420px; height: 210px; border-radius: 210px 210px 0 0; border: 1px solid #3A4C70; border-bottom: 0; }
.hn-onde-2 { width: 540px; max-width: 100%; height: 270px; border-radius: 270px 270px 0 0; border: 1px solid #2C3C5E; border-bottom: 0; }
.hn-ligne { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #fff; }
.hn-icones { position: absolute; left: 4%; right: 4%; bottom: 18px; display: flex; justify-content: space-between; align-items: flex-end; }
.hn-icones img { width: 72px; height: 72px; border-radius: 18px; border: 3px solid #fff; display: block; }

/* Bandeau */
.hn-bandeau { background: #F2A541; padding-top: 22px; padding-bottom: 22px; gap: 8px 28px; text-align: center; }
.hn-bandeau p { margin: 0; color: #14213D; }
.hn-leitmotiv { font-family: "Space Grotesk", sans-serif; font-size: 22px; }

/* Cartes projets */
.hn-cartes { gap: 24px; }
.hn-carte { background: #fff; border: 1px solid #DDE2EA; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.hn-carte > * { margin: 0 !important; }
.hn-carte-visuel { height: 220px; overflow: hidden; position: relative; }
.hn-fond-creme { background: #F6E7CD; }
.hn-carte-visuel .wp-block-image { margin: 0; height: 100%; display: flex; justify-content: center; align-items: flex-end; }
.hn-carte-mimi img { height: 210px; width: auto; display: block; }
.hn-carte-photo img { width: 100%; height: 220px; object-fit: cover; display: block; }
.hn-carte-photo { width: 100%; }
.hn-visuel-apprendre { background: #14213D; padding: 0 28px; display: flex; flex-direction: column; justify-content: center; box-sizing: border-box; }
.hn-visuel-kicker { margin: 0 0 8px; font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #F2A541; }
.hn-visuel-titre { margin: 0; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 26px; line-height: 1.15; color: #fff; max-width: 230px; }
.hn-mini-soleil { position: absolute; right: -40px; bottom: 0; width: 150px; height: 75px; border-radius: 75px 75px 0 0; background: #F2A541; }
.hn-mini-ligne { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #fff; }
.hn-carte-corps { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex-grow: 1; }
.hn-carte-corps > * { margin: 0 !important; }
.hn-carte-corps h3 { margin: 0; }
.hn-carte-corps .hn-carte-texte { flex-grow: 1; }
.hn-liens { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.hn-lien { font-weight: 600; padding: 10px 0; display: inline-block; }
a.hn-lien.hn-mimi { color: #8E241D; }
a.hn-lien.hn-apprendre { color: #7A4A06; }
a.hn-lien.hn-boutique { color: #24365F; }
.hn-avenir { margin-top: 24px; background: #fff; border: 1px dashed #B8C2D3; border-radius: 16px; padding: 20px 24px; gap: 12px 20px; }
.hn-avenir-texte { margin: 0; color: #4A566D; flex: 1 1 400px; }
.hn-avenir-texte strong { color: #14213D; }

/* Ateliers */
.hn-ateliers-grille { gap: 48px; }
.hn-ateliers-texte { flex: 1 1 380px; min-width: 0; }
.hn-ateliers-texte h2 { margin: 0 0 20px; }
.hn-chapo-sombre { font-size: 17px; color: #4A566D; margin: 0 0 24px; }
.hn-formules { flex: 1 1 520px; min-width: 0; gap: 16px; }
.hn-formule { background: #F4F6F9; border-radius: 14px; padding: 22px; }
.hn-formule > * { margin: 0 0 8px; }
.hn-formule h3 { font-size: 21px; }
.hn-formule p:last-child { margin: 0; font-size: 15px; color: #4A566D; line-height: 1.55; }
.hn-formule-duree { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #7A4A06; }

/* Méthode */
.hn-etapes { gap: 24px; }
.hn-etape { background: #fff; border: 1px solid #DDE2EA; border-radius: 16px; padding: 28px; }
.hn-etape > * { margin: 0 0 12px; }
.hn-etape > *:last-child { margin: 0; }
.hn-etape h3 { font-size: 22px; }
.hn-numero { width: 44px; height: 44px; border-radius: 50%; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 20px; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
.hn-numero-nuit { background: #14213D; color: #fff; }
.hn-numero-soleil { background: #F2A541; color: #14213D; }
.hn-numero-contour { border: 2px solid #14213D; color: #14213D; }

/* Studio */
.hn-studio-grille { gap: 56px; }
.hn-portrait-col { flex: 0 1 340px; min-width: 0; }
.hn-portrait img { width: 100%; max-width: 340px; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 20px; display: block; background: #F4F6F9; }
.hn-portrait { margin: 0; }
.hn-studio-texte { flex: 1 1 480px; min-width: 0; }
.hn-studio-texte h2 { margin: 0 0 8px; }
.hn-sous-titre { font-size: 18px; font-weight: 600; color: #7A4A06; margin: 0 0 24px; }
.hn-texte-long { font-size: 17px; line-height: 1.65; color: #4A566D; margin: 0 0 16px; }
.hn-diplomes { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.hn-diplomes span { font-size: 14px; padding: 6px 12px; border-radius: 999px; background: #F4F6F9; color: #24365F; }

/* Engagements */
.hn-section-engagements { padding-top: 72px; padding-bottom: 24px; }
.hn-engagements { gap: 32px; }
.hn-engagement { gap: 14px; }
.hn-engagement > * { margin: 0; }
.hn-picto { color: #14213D; flex: none; display: block; }
.hn-engagement-titre { font-size: 18px; margin: 0 0 6px; }
.hn-engagement .hn-carte-texte { font-size: 15px; line-height: 1.55; }

/* Contact */
.hn-section-contact { padding-top: 64px; }
.hn-contact-boite { background: #14213D; color: #fff; border-radius: 20px; padding: 56px 48px; gap: 32px 48px; }
.hn-contact-texte { flex: 1 1 420px; min-width: 0; }
.hn-contact-texte h2 { color: #fff; font-size: 34px; margin: 0 0 14px; }
.hn-contact-texte .hn-chapo { margin: 0; font-size: 17px; }
.hn-contact-actions { flex: 0 1 auto; }
.hn-contact-actions .wp-block-buttons { flex-direction: column; align-items: stretch; }
.hn-contact-actions .wp-block-button__link { width: 100%; text-align: center; }
.hn-contact-insta { text-align: center; margin: 12px 0 0; }
.hn-contact-insta a { color: #fff; font-weight: 600; }

/* Pied de page */
.hn-footer { background: #14213D; color: #C9D3E3; padding-top: 48px; padding-bottom: 28px; font-size: 14px; }
.hn-footer a { color: #C9D3E3; }
.hn-footer a:hover { color: #fff; }
.hn-foot-grille { gap: 32px 64px; }
.hn-foot-intro { flex: 1 1 300px; min-width: 0; }
.hn-foot-col { flex: 0 1 200px; }
.hn-foot-col > * { margin: 0 0 6px; }
.hn-foot-titre { color: #fff; }
.hn-foot-titre strong { font-weight: 600; }
.hn-foot-intro .hn-foot-titre strong { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 18px; }
.hn-foot-bas { border-top: 1px solid #2C3C5E; margin-top: 32px; padding-top: 18px; font-size: 13px; }
.hn-foot-bas p { margin: 0; }

/* Pages simples */
.hn-titre-page { background: #14213D; color: #fff; padding-top: 64px; padding-bottom: 48px; }
.hn-titre-page h1 { color: #fff; font-size: clamp(32px, 4vw, 48px); }
.hn-contenu { padding-top: 48px; padding-bottom: 88px; }
.hn-contenu h2 { font-size: 24px; margin-top: 40px; }
.hn-date { color: #5A6780; font-size: 14px; }
.hn-404 { padding-top: 120px; padding-bottom: 120px; }

/* Téléphone */
@media (max-width: 781px) {
	.hn-hero { padding-top: 56px; }
	.hn-hero-texte { padding-bottom: 32px; }
	.hn-horizon { height: 220px; }
	.hn-soleil { width: 200px; height: 100px; }
	.hn-onde-1 { width: 280px; height: 140px; }
	.hn-onde-2 { width: 360px; height: 180px; }
	.hn-icones img { width: 56px; height: 56px; border-radius: 14px; }
	.hn-section { padding-top: 64px; padding-bottom: 64px; }
	.hn-contact-boite { padding: 36px 24px; }
	.hn-contact-actions { flex: 1 1 100%; }
	.hn-studio-grille { gap: 32px; }
}

/* Grilles : les colonnes remplissent toute la largeur */
.hn-cartes.is-layout-grid { grid-template-columns: repeat(auto-fit, minmax(min(18.5rem, 100%), 1fr)) !important; }
.hn-etapes.is-layout-grid { grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)) !important; }
.hn-engagements.is-layout-grid { grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)) !important; }
.hn-formules.is-layout-grid { grid-template-columns: 1fr !important; }
.hn-formule h3 { font-size: 20px; }
.hn-formule { padding: 20px 24px; }
.hn-foot-intro { flex: 2 1 320px; max-width: 440px; }
.hn-carte-corps h3 { font-size: 24px; }
@media (max-width: 781px) { .hn-horizon { height: 200px; } }
