/*
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.3.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); }

/* ============================================================
   Formulaire de contact [allopc_formulaire]
   ============================================================ */
.allopc-form-zone { font-size: 1rem; }
.allopc-form { display: flex; flex-direction: column; gap: 18px; }
.allopc-form p { margin: 0; }
.allopc-form-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 640px) { .allopc-form-grille { grid-template-columns: 1fr; } }
.allopc-champ { display: flex; flex-direction: column; gap: 6px; }
.allopc-champ > label, .allopc-form-profil legend { font-weight: 600; color: var(--allopc-anthracite); }
.allopc-obl { color: var(--allopc-bleu-fonce); }
.allopc-form input[type="text"],
.allopc-form input[type="email"],
.allopc-form input[type="tel"],
.allopc-form select,
.allopc-form textarea {
	width: 100%; box-sizing: border-box;
	font: inherit; color: var(--allopc-anthracite);
	background: #FFFFFF;
	border: 1px solid #C9C9C0; border-radius: 4px;
	padding: 12px 14px; min-height: 48px;
}
.allopc-form textarea { min-height: 150px; resize: vertical; }
.allopc-form input:focus, .allopc-form select:focus, .allopc-form textarea:focus {
	outline: none; border-color: var(--allopc-bleu); box-shadow: 0 0 0 3px rgba(36, 159, 218, 0.25);
}
.allopc-champ--captcha input[type="text"] { max-width: 140px; }
.allopc-champ--erreur input, .allopc-champ--erreur textarea, .allopc-champ--erreur select { border-color: #B3261E; }
.allopc-champ--erreur > label { color: #8C1D18; }
.allopc-form-profil { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.allopc-form-profil legend { width: 100%; margin-bottom: 6px; padding: 0; }
.allopc-form-profil label, .allopc-champ--case label {
	display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-weight: 400; min-height: 32px;
}
.allopc-form input[type="radio"], .allopc-form input[type="checkbox"] {
	width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--allopc-bleu-fonce); flex-shrink: 0;
}
.allopc-champ--case label { color: var(--allopc-gris); font-size: 0.9375rem; }
.allopc-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.allopc-form button.allopc-bouton { cursor: pointer; font: inherit; font-weight: 700; padding: 14px 28px; }
.allopc-form-note { color: var(--allopc-gris); font-size: 0.875rem; }
.allopc-form-piege { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.allopc-form-alerte { border-radius: 6px; padding: 16px 18px; margin-bottom: 20px; line-height: 1.5; }
.allopc-form-alerte ul { margin: 8px 0 0 18px; padding: 0; }
.allopc-form-alerte--ok { background: #E3F2EA; color: #1D5631; border-left: 4px solid #2E7D4F; }
.allopc-form-alerte--erreur { background: #FBE9E7; color: #8C1D18; border-left: 4px solid #B3261E; }
.allopc-form-concerne {
	background: var(--allopc-pierre); border-radius: 6px; padding: 12px 16px; color: var(--allopc-gris);
}
.allopc-form-concerne strong { color: var(--allopc-anthracite); }

/* ============================================================
   Bandeau du haut (Apparence › Bandeau du site)
   ============================================================ */
.allopc-bandeau { background: var(--allopc-encre); color: #E6E6E0; font-size: 0.9375rem; position: relative; z-index: 101; }
.allopc-bandeau__inner {
	max-width: calc(var(--allopc-largeur) + 2 * var(--allopc-marge)); box-sizing: border-box;
	margin: 0 auto; padding: 8px var(--allopc-marge);
	display: flex; align-items: center; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap;
}
.allopc-bandeau__texte { margin: 0; display: flex; align-items: center; gap: 10px; line-height: 1.4; }
.allopc-bandeau__icone { color: var(--allopc-bleu); flex-shrink: 0; }
.allopc-bandeau__court { display: none; }
.allopc-bandeau__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.allopc-bandeau a.allopc-bandeau__bouton {
	display: inline-flex; align-items: center; min-height: 36px; box-sizing: border-box;
	padding: 6px 14px; border-radius: 4px;
	background: var(--allopc-bleu); color: var(--allopc-encre); font-weight: 700; text-decoration: none; white-space: nowrap;
}
.allopc-bandeau a.allopc-bandeau__bouton:hover { background: #4DB3E6; color: var(--allopc-encre); }
.allopc-bandeau a.allopc-bandeau__bouton--secondaire { background: transparent; color: #FFFFFF; border: 1px solid #6E6E64; }
.allopc-bandeau a.allopc-bandeau__bouton--secondaire:hover { background: transparent; border-color: var(--allopc-bleu); color: #FFFFFF; }
.allopc-bandeau__libelle-court { display: none; }
@media (max-width: 1100px) {
	.allopc-bandeau__inner { flex-wrap: nowrap; }
	.allopc-bandeau__long { display: none; }
	.allopc-bandeau__court { display: inline; }
}
@media (max-width: 767px) {
	.allopc-bandeau { font-size: 0.875rem; }
	.allopc-bandeau__inner { padding-top: 6px; padding-bottom: 6px; }
	.allopc-bandeau__actions .allopc-bandeau__bouton--secondaire { display: none; }
}
@media (max-width: 479px) {
	.allopc-bandeau__libelle { display: none; }
	.allopc-bandeau__libelle-court { display: inline; }
}
