/*
Theme Name: AlloPC (Hello Elementor)
Theme URI: https://allopc.ch/
Description: Thème enfant de Hello Elementor pour AlloPC.ch : en-tête et pied de page aux couleurs du logo, polices hébergées localement, couleurs et typographies Elementor préréglées. Les pages se construisent avec Elementor (gratuit ou Pro).
Author: AlloPC.ch
Template: hello-elementor
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
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: allopc-elementor
*/

/* ---------- Polices locales (aucun appel à Google) ---------- */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("assets/fonts/ibm-plex-sans-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600 700; font-display: swap; src: url("assets/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); }

:root {
	--allopc-bleu: #249FDA;
	--allopc-bleu-fonce: #1A78A8;
	--allopc-gris: #595950;
	--allopc-anthracite: #2B2B26;
	--allopc-encre: #1F1F1B;
	--allopc-pierre: #F5F5F2;
	--allopc-texte-doux: #CFCFC6;
	--allopc-largeur: 1280px;
	--allopc-marge: 24px;
}

body {
	font-family: "IBM Plex Sans", system-ui, sans-serif;
	color: var(--allopc-anthracite);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { font-family: "Space Grotesk", system-ui, sans-serif; }
a { color: var(--allopc-bleu-fonce); }
:focus-visible { outline: 3px solid var(--allopc-bleu); outline-offset: 2px; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}

/* ---------- Boutons du thème ---------- */
.allopc-bouton {
	display: inline-block;
	background: var(--allopc-bleu);
	color: var(--allopc-encre) !important;
	font-weight: 700;
	text-decoration: none;
	padding: 0.8rem 1.4rem;
	border-radius: 4px;
	border: 1px solid var(--allopc-bleu);
	white-space: nowrap;
	line-height: 1.3;
}
.allopc-bouton:hover { background: #4DB3E6; border-color: #4DB3E6; }
.allopc-bouton--contour { background: transparent; color: #FFFFFF !important; border-color: #6E6E64; }
.allopc-bouton--contour:hover { background: transparent; border-color: var(--allopc-bleu); }

/* ---------- En-tête ---------- */
.allopc-header { background: #FFFFFF; border-bottom: 1px solid #E4E4DF; position: relative; z-index: 100; }
.allopc-header__inner {
	max-width: calc(var(--allopc-largeur) + 2 * var(--allopc-marge));
	box-sizing: border-box;
	margin: 0 auto;
	padding: 10px var(--allopc-marge);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}
.allopc-header__logo { display: block; line-height: 0; flex-shrink: 0; }
.allopc-header__logo img { height: 64px; width: auto; }
.allopc-header__nav { display: flex; align-items: center; gap: 32px; }
.allopc-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; }
.allopc-menu li { position: relative; }
.allopc-menu a { color: var(--allopc-gris); text-decoration: none; font-weight: 500; padding: 10px 0; display: block; }
.allopc-menu a:hover,
.allopc-menu .current-menu-item > a,
.allopc-menu .current-menu-ancestor > a { color: var(--allopc-bleu-fonce); }
.allopc-menu .sub-menu {
	list-style: none; margin: 0; padding: 8px 0;
	position: absolute; top: 100%; left: -16px; min-width: 260px;
	background: #FFFFFF; border: 1px solid #E4E4DF; border-top: 3px solid var(--allopc-bleu);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
	display: none;
}
.allopc-menu .sub-menu a { padding: 8px 16px; }
.allopc-menu li:hover > .sub-menu,
.allopc-menu li:focus-within > .sub-menu { display: block; }
.allopc-menu .menu-item-has-children > a::after { content: " ▾"; font-size: 0.75em; }

.allopc-header__toggle { display: none; }

@media (max-width: 1024px) {
	.allopc-header__logo img { height: 52px; }
	.allopc-header__toggle {
		display: inline-flex; align-items: center; justify-content: center;
		width: 48px; height: 48px; padding: 0;
		background: transparent; border: 1px solid #DCDCD5; border-radius: 4px; cursor: pointer;
	}
	.allopc-burger, .allopc-burger::before, .allopc-burger::after {
		display: block; width: 22px; height: 2px; background: var(--allopc-anthracite); position: relative; content: "";
	}
	.allopc-burger::before { position: absolute; top: -7px; }
	.allopc-burger::after { position: absolute; top: 7px; }
	.allopc-header__toggle[aria-expanded="true"] .allopc-burger { background: transparent; }
	.allopc-header__toggle[aria-expanded="true"] .allopc-burger::before { top: 0; transform: rotate(45deg); }
	.allopc-header__toggle[aria-expanded="true"] .allopc-burger::after { top: 0; transform: rotate(-45deg); }

	.allopc-header__nav {
		display: none;
		position: absolute; top: 100%; left: 0; right: 0;
		background: #FFFFFF; border-bottom: 1px solid #E4E4DF;
		flex-direction: column; align-items: stretch; gap: 16px;
		padding: 12px var(--allopc-marge) 24px;
		box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
	}
	.allopc-header__nav.is-open { display: flex; }
	.allopc-menu { flex-direction: column; gap: 0; }
	.allopc-menu > li { border-bottom: 1px solid #EEEEEA; }
	.allopc-menu a { font-size: 1.125rem; padding: 12px 0; }
	.allopc-menu .sub-menu { display: block; position: static; border: 0; box-shadow: none; padding: 0 0 8px 16px; min-width: 0; }
	.allopc-menu .sub-menu a { font-size: 1rem; padding: 8px 0; }
	.allopc-menu .menu-item-has-children > a::after { content: ""; }
	.allopc-header__tel { text-align: center; }
}

/* ---------- Pied de page ---------- */
.allopc-footer { background: var(--allopc-anthracite); color: var(--allopc-texte-doux); }
.allopc-footer__cta,
.allopc-footer__bas {
	max-width: calc(var(--allopc-largeur) + 2 * var(--allopc-marge));
	box-sizing: border-box;
	margin: 0 auto;
	padding-left: var(--allopc-marge);
	padding-right: var(--allopc-marge);
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px;
}
.allopc-footer__cta { padding-top: 72px; padding-bottom: 72px; }
.allopc-footer__cta h2 { color: #FFFFFF; font-weight: 700; letter-spacing: -0.02em; font-size: clamp(2rem, 4vw, 2.5rem); margin: 0 0 8px; }
.allopc-footer__cta p { margin: 0; }
.allopc-footer__boutons { display: flex; flex-wrap: wrap; gap: 14px; }
.allopc-footer__bas {
	max-width: none;
	border-top: 1px solid #45453D;
	padding-top: 22px; padding-bottom: 22px;
	font-size: 0.875rem; color: #B5B5AB;
	padding-left: max(var(--allopc-marge), calc((100% - var(--allopc-largeur)) / 2));
	padding-right: max(var(--allopc-marge), calc((100% - var(--allopc-largeur)) / 2));
}
.allopc-footer__bas p { margin: 0; }
.allopc-footer__bas a { color: #B5B5AB; }
.allopc-footer__bas a:hover { color: #FFFFFF; }

.allopc-appel-mobile { display: none; }
@media (max-width: 767px) {
	.allopc-appel-mobile {
		display: inline-block;
		position: fixed; right: 16px; bottom: 16px; z-index: 90;
		border-radius: 999px;
		box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
	}
	.allopc-footer__bas { padding-bottom: 88px; }
}

/* ============================================================
   Classes à utiliser dans Elementor (Avancé › Classes CSS)
   ============================================================ */

/* Silhouette de montagnes en bas d'un conteneur sombre */
.allopc-montagnes { position: relative; overflow: hidden; }
.allopc-montagnes::after {
	content: "";
	position: absolute; left: 0; right: 0; bottom: 0;
	height: 160px;
	background: url("assets/images/montagnes.svg") bottom center / 100% 100% no-repeat;
	pointer-events: none;
	z-index: 0;
}
.allopc-montagnes > .e-con-inner,
.allopc-montagnes > .elementor-element { position: relative; z-index: 1; }

/* Largeur de lecture confortable */
.allopc-titre-large .elementor-heading-title { max-width: 14em; }
.allopc-texte-large p { max-width: 40rem; }

/* Liens et listes sur fond sombre */
.allopc-sur-sombre a { color: #FFFFFF; }
.allopc-sur-sombre a:hover { color: var(--allopc-bleu); }

/* Liste à tirets bleus (widget Éditeur de texte) */
.allopc-liste ul { list-style: none; padding-left: 0; margin: 0; }
.allopc-liste li { position: relative; padding-left: 1.6em; margin: 0.5rem 0; }
.allopc-liste li::before { content: "—"; position: absolute; left: 0; color: var(--allopc-bleu); }

/* Titres de cartes cliquables */
.allopc-carte .elementor-heading-title a { color: inherit; }
.allopc-carte .elementor-heading-title a:hover { color: var(--allopc-bleu-fonce); text-decoration: underline; }

/* Paragraphes des widgets texte : pas de marge finale */
.elementor-widget-text-editor p:last-child { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
	* { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Bouton du menu mobile : neutraliser le style de bouton de Hello Elementor */
.allopc-header .allopc-header__toggle,
.allopc-header .allopc-header__toggle:hover,
.allopc-header .allopc-header__toggle:focus { background: #FFFFFF; color: var(--allopc-anthracite); }
