/* ==========================================================================
   C.R.C. Curé-Labelle — styles du thème enfant (repris de la config Porto)
   ========================================================================== */

:root {
	--crc-blue: #003764;
	--crc-green: #009639;
	--crc-link-hover: #4d89cd;
	--crc-footer: #183f72;
	--crc-footer-text: #a3b2c7;
	--crc-light: #f1f6f9;
	--crc-text: #333;
	--crc-heading-font: "Fondamento", Georgia, serif;
	--crc-body-font: "Open Sans", Arial, sans-serif;
	--crc-container: 1200px;
}

/* ---------- Base ---------- */
.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 !important; width: 1px; word-wrap: normal !important; }
.skip-link.screen-reader-text:focus { clip: auto; clip-path: none; height: auto; width: auto; left: 8px; top: 8px; padding: 12px 18px; background: #fff; z-index: 100000; }

body {
	font-family: var(--crc-body-font);
	font-size: 15px;
	line-height: 1.6;
	color: var(--crc-text);
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--crc-heading-font);
	font-weight: 400;
	line-height: 1.2;
	margin: 0 0 .6em;
}
h1 { font-size: 32px; color: var(--crc-blue); }
h2 { font-size: 26px; color: var(--crc-green); }
h3 { font-size: 26px; color: var(--crc-green); }
h4 { font-size: 22px; color: var(--crc-green); }
h5, h6 { font-family: var(--crc-body-font); font-weight: 700; color: var(--crc-blue); }

a,
a:visited { color: var(--crc-green); font-weight: 700; text-decoration: none; }
a:hover,
a:focus { color: var(--crc-link-hover); }

img { max-width: 100%; height: auto; }

.crc-container {
	max-width: var(--crc-container);
	margin: 0 auto;
	padding: 0 20px;
}

.crc-content { min-height: 40vh; }

/* Pages non construites avec Elementor (articles, politique, etc.) */
.crc-content > main.site-main,
.crc-content > .site-main {
	max-width: var(--crc-container);
	margin: 0 auto;
	padding: 30px 20px;
}

/* ---------- En-tête ---------- */
.crc-header { position: sticky; top: 0; z-index: 100; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .08); }
.admin-bar .crc-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .crc-header { top: 0; } }

.crc-topbar { background: var(--crc-blue); color: #fff; font-size: 14px; }
.crc-topbar__inner { display: flex; justify-content: space-between; align-items: center; min-height: 36px; gap: 20px; }
.crc-topbar ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }
.crc-topbar a, .crc-topbar a:visited { color: #fff; }
.crc-topbar a:hover { color: #ccffff; }
.crc-lang li { text-transform: uppercase; }

.crc-mainbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 90px; }
.crc-logo img { max-width: 250px; width: 100%; height: auto; display: block; }

.crc-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.crc-menu li { position: relative; }
.crc-menu > li > a {
	display: block;
	padding: 10px 14px;
	font-size: 16px;
	font-weight: 700;
	color: var(--crc-blue);
	border-radius: 4px;
}
.crc-menu > li > a:hover,
.crc-menu > li:focus-within > a,
.crc-menu > li.current-menu-item > a,
.crc-menu > li.current-menu-ancestor > a { background: var(--crc-blue); color: #fff; }

.crc-menu .sub-menu {
	list-style: none;
	margin: 0;
	padding: 6px 0;
	position: absolute;
	left: 0;
	top: 100%;
	min-width: 260px;
	background: #fff;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
	border-top: 3px solid var(--crc-blue);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: all .15s ease;
	z-index: 10;
}
.crc-menu li:hover > .sub-menu,
.crc-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.crc-menu .sub-menu a { display: block; padding: 8px 18px; color: var(--crc-blue); font-size: 14px; }
.crc-menu .sub-menu a:hover { background: var(--crc-light); color: var(--crc-green); }
.crc-menu .sub-menu .sub-menu { left: 100%; top: 0; }

.crc-menu-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.crc-menu-toggle__bar,
.crc-menu-toggle__bar::before,
.crc-menu-toggle__bar::after {
	display: block; width: 26px; height: 3px; background: var(--crc-blue); border-radius: 2px; position: relative; content: "";
}
.crc-menu-toggle__bar::before { position: absolute; top: -8px; }
.crc-menu-toggle__bar::after { position: absolute; top: 8px; }

@media (max-width: 1024px) {
	.crc-hide-mobile { display: none; }
	.crc-menu-toggle { display: block; }
	.crc-logo img { max-width: 180px; }
	.crc-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; box-shadow: 0 8px 16px rgba(0, 0, 0, .1); max-height: 75vh; overflow-y: auto; }
	.crc-nav.is-open { display: block; }
	.crc-mainbar { position: relative; }
	.crc-menu { flex-direction: column; padding: 10px 20px 20px; }
	.crc-menu > li > a { padding: 12px 10px; border-bottom: 1px solid #eee; border-radius: 0; }
	.crc-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 16px; min-width: 0; }
}

/* ---------- Bande de titre ---------- */
.crc-pagetitle { background: var(--crc-blue); color: #fff; padding: 28px 0; }
.crc-pagetitle__h1 { color: #fff; margin: 0; font-size: 30px; }

/* ---------- Contenu Elementor converti ---------- */
.elementor-widget-text-editor ul { padding-left: 1.4em; }
.crc-separator .elementor-divider-separator { border-color: var(--crc-green); }

.crc-img-circle img {
	border-radius: 50%;
	box-shadow: 0 0 0 5px #fff, 0 2px 10px rgba(0, 0, 0, .25);
	aspect-ratio: 1 / 1;
	object-fit: cover;
}
.crc-img-shadow img { box-shadow: 0 0 0 5px #fff, 0 2px 10px rgba(0, 0, 0, .25); }

.crc-btn .elementor-button,
a.crc-btn {
	background: var(--crc-blue);
	color: #fff;
	font-family: var(--crc-body-font);
	font-weight: 700;
	border-radius: 4px;
	display: inline-block;
	padding: 14px 28px;
}
.crc-btn .elementor-button:hover,
a.crc-btn:hover { background: var(--crc-green); color: #fff; }

/* Bandeau vert de l'accueil (« Dans le but de leur permettre de Réussir… ») */
.crc-home-intro { color: #fff; font-size: 20px; }
.crc-home-intro .elementor-widget-text-editor { font-size: 22px; line-height: 1.4; }

/* Formulaire Contact Form 7 */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea { width: 100%; padding: 10px 12px; border: 1px solid #ccd; border-radius: 4px; font: inherit; }
.wpcf7 input[type="submit"] { background: var(--crc-blue); color: #fff; border: 0; padding: 12px 26px; border-radius: 4px; font-weight: 700; cursor: pointer; }
.wpcf7 input[type="submit"]:hover { background: var(--crc-green); }

/* ---------- Diaporama ---------- */
.crc-diaporama { position: relative; height: clamp(260px, 42vw, 520px); overflow: hidden; background: var(--crc-blue); }
.crc-slide {
	position: absolute; inset: 0;
	background-size: cover; background-position: center;
	opacity: 0; transition: opacity 1s ease;
	display: flex; align-items: center;
}
.crc-slide.is-active { opacity: 1; }
.crc-slide::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 55, 100, .75) 0%, rgba(0, 55, 100, .15) 70%); }
.crc-slide__text { position: relative; max-width: var(--crc-container); width: 100%; margin: 0 auto; padding: 0 40px; color: #fff; }
.crc-slide__line { display: block; font-family: var(--crc-heading-font); font-size: clamp(22px, 3.6vw, 46px); line-height: 1.25; text-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.crc-slide__line--0 { color: #ccffff; }
.crc-slide.is-active .crc-slide__line { animation: crc-rise .9s ease both; }
.crc-slide.is-active .crc-slide__line--1 { animation-delay: .25s; }
.crc-slide.is-active .crc-slide__line--2 { animation-delay: .5s; }
@keyframes crc-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.crc-diaporama__dots { position: absolute; bottom: 18px; left: 0; right: 0; display: flex; justify-content: center; gap: 10px; }
.crc-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; background: transparent; padding: 0; cursor: pointer; }
.crc-dot.is-active { background: #fff; }

@media (prefers-reduced-motion: reduce) {
	.crc-slide, .crc-slide.is-active .crc-slide__line { transition: none; animation: none; }
}

/* ---------- Pied de page ---------- */
.crc-footer { background: var(--crc-footer); color: var(--crc-footer-text); padding-top: 60px; }
.crc-footer__cols { display: grid; grid-template-columns: 3fr 3fr 3fr 3fr; gap: 30px; padding-bottom: 40px; }
.crc-footer h4 { color: #fff; font-family: var(--crc-body-font); font-weight: 700; font-size: 1.4em; margin-bottom: 14px; }
.crc-footer ul { list-style: none; margin: 0; padding: 0; }
.crc-footer li { margin-bottom: 6px; line-height: 1.6; }
.crc-footer a, .crc-footer a:visited { color: var(--crc-green); }
.crc-footer a:hover { color: var(--crc-link-hover); }
.crc-footer__phone { display: flex; align-items: center; gap: 10px; }
.crc-footer__phone small { display: block; color: var(--crc-footer-text); font-size: .9em; font-weight: 600; }
.crc-footer__phone strong { display: block; color: #fff; font-size: 1.5em; line-height: 1.2; }
.crc-footer__bottom {
	display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
	border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 24px; padding-bottom: 40px;
}
.crc-footer__logo img { max-width: 120px; display: block; }
.crc-footer__copy { margin: 0; font-size: 14px; }

@media (max-width: 900px) {
	.crc-footer__cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
	.crc-footer__cols { grid-template-columns: 1fr; }
	.crc-footer__bottom { justify-content: center; text-align: center; }
}
