/*
Theme Name: HelloElementorChild
Theme URI: preprod-audit.maksyma.fr
Description: Hello Elementor Child Theme
Author: Christelle
Author URL: https://www.ckweb.fr
Template: hello-elementor
Version: 1.0.0
Text Domain: hello-elementor-child
*/


/*je rajoute ici mon CSS personnalisé*/


/* exemple ajout de font: 
METHODE 1 : les poser à la racine de mon thème en .ttf au minimum*/
/*
Puis ajouter ici dans mon style.css enfant:

@font-face {
font-family: ‘maPolice‘;
src: url(‘maPolice.eot’);
src: url(‘maPolice.eot?#iefix’) format(’embedded-opentype’),
url(‘maPolice.woff2′) format(‘woff2’),
url(‘maPolice.woff’) format(‘woff’),
url(‘maPolice.ttf’) format(‘truetype’),
url(‘maPolice.svg#svgmaPolice‘) format(‘svg’);
}

METHODE 2 : dupliquer le header.php parent dans le thème enfant et dans le head ajouter le lien googlefont
<link href=”https://fonts.googleapis.com/css?family=maPolice” rel=”stylesheet”>
*/

/*appel de la police, exemple: mes titres*/
/*
h1, h2, h3{
    font-family: 'maPolice', Arial, sans-serif !important;
}
Notez :  [!important] n’est pas obligatoire, rajoutez-le si la font ne parvient pas à être prise en compte.
*/

body {
	background-color: rgb(255, 250, 246) ;
	/* color: #242424; */
	/* font-family: "Playfair Display", Helvetica, sans-serif !important; */
	/* font-size: 15pt ; */
	/* font-weight: 300 ; */
	/* line-height: 1.65 ; */
	max-width: 1600px;
	margin: auto;
}

h1, h2{
	text-align: center;
}

.site-title{
	text-align: center;
}


html {
    scroll-behavior: smooth;
}



/* ===== fond-couleur-global  ajout de classe css pour les appliquer ===== */
.fond-primaire {
  background-color: var(--e-global-color-primary);
  padding: 10px 15px;
  color: black;
}
.fond-secondaire {
  background-color: #EB907C;
  padding: 10px 15px;
}
.fond-clair{
  background-color: #EB907C30;
}

/* ===== Menu principal ===== */
.nav-principale {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--e-global-color-accent, #6b6e50);
}
.nav-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	justify-content: center;
	gap: 1.5em;
}
.nav-menu li { position: relative; }
.nav-menu a {
	display: block;
	padding: 1em 0.5em;
	color: #ffffff;
	text-decoration: none;
}
.nav-menu a:hover,
.nav-menu .current-menu-item > a { color: #ffffff; }

/* Sous-menus (ordinateur) : apparaissent au survol */
.nav-menu .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 200px;
	background: var(--e-global-color-accent, #6b6e50);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
	display: none;
}
.nav-menu li:hover > .sub-menu,
.nav-menu li:focus-within > .sub-menu { display: block; }

.nav-burger { display: none; }

/* Mobile et tablette : menu burger */
@media (max-width: 1024px) {
	.nav-burger {
		display: block;
		margin-left: auto;
		padding: 1em;
		background: none;
		border: 0;
		cursor: pointer;
	}
	.nav-burger span:not(.screen-reader-text) {
		display: block;
		width: 26px;
		height: 3px;
		margin: 5px 0;
		background: var(--e-global-color-text, #ffffff);
		transition: transform 0.3s, opacity 0.3s;
	}
	.nav-burger:hover{
		background: var(--e-global-color-secundary, #EB907C);
	}
	/* Burger qui se transforme en croix */
	.ouvert .nav-burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
	.ouvert .nav-burger span:nth-child(2) { opacity: 0; }
	.ouvert .nav-burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

	.nav-menu {
		display: none;
		flex-direction: column;
		gap: 0;
		text-align: center;
	}
	.nav-principale.ouvert .nav-menu { display: flex; }

	.nav-menu .sub-menu {
		position: static;
		display: block;
		box-shadow: none;
		
	}
	.nav-principale{
		background: transparent;
	}
	#menu-principal{
		background: var(--e-global-color-secundary, #EB907C);
	}
	.nav-menu .sub-menu a { font-size: 0.9em; }
}

/* ===== Classes utilitaires (remplacent Bootstrap) ===== */
.container {
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 12px;
}
.row {
	display: flex;
	flex-wrap: wrap;
}
.row > * { box-sizing: border-box; }
.col-md-12,
.col-lg-4,
.col-lg-8 { width: 100%; }

@media (min-width: 992px) {
	.col-lg-4 { width: 33.333%; }
	.col-lg-8 { width: 66.667%; }
	.p-lg-5 { padding: 3rem; }
}

.d-flex { display: flex; }
.justify-content-center { justify-content: center; }
@media (min-width: 768px) {
	.d-md-flex { display: flex; }
	.justify-content-md-evenly { justify-content: space-evenly; }
}

.p-1 { padding: 0.25rem; }
.p-3 { padding: 1rem; }
.mb-5 { margin-bottom: 3rem; }

.img-fluid { max-width: 100%; height: auto; }
.w-25 { width: 25%; }
.w-80 { width: 80%; }
.w-100 { width: 100%; }

.text-center { text-align: center; }
.text-white { color: #ffffff; }

/* ===== Couleurs des extraits (couleurs globales Elementor) ===== */
.liste-ressources {
	color: var(--e-global-color-text);
}
.liste-ressources h3,
.liste-ressources h3 a {
	color: var(--e-global-color-primary);
	font-family: var(--e-global-typography-primary-font-family), sans-serif;
}
.liste-ressources h3 a:hover {
	color: var(--e-global-color-accent);
}
.liste-ressources .button {
	display: inline-block;
	padding: 0.6em 1.5em;
	background-color: var(--e-global-color-accent);
	color: #ffffff;
	border-radius: 6px;
	text-decoration: none;
}
.liste-ressources .button:hover {
	background-color: var(--e-global-color-primary);
	color: #ffffff;
}

/* ===== Moteur de recherche des ressources ===== */
.recherche-ressources {
	display: flex;
	gap: 0.5em;
	max-width: 600px;
	margin: 0 auto 1.5em;
}
.recherche-ressources input[type="search"] {
	flex: 1;
	padding: 0.6em 1em;
	border: 1px solid #cccccc;
	border-radius: 6px;
	font-size: 1em;
}
.recherche-ressources .button {
	padding: 0.6em 1.5em;
	background-color: var(--e-global-color-accent);
	color: #ffffff;
	border: 0;
	border-radius: 6px;
	cursor: pointer;
}
.recherche-ressources .button:hover {
	background-color: var(--e-global-color-primary);
}
.recherche-info {
	text-align: center;
	margin-bottom: 1.5em;
}

/* ===== Grille des ressources ===== */
.liste-ressources {
	display: grid;
	grid-template-columns: 1fr;          /* mobile : 1 colonne */
	gap: 1.5em;
}
@media (min-width: 600px) {
	.liste-ressources {
		grid-template-columns: repeat(2, 1fr);   /* tablette : 2 colonnes */
	}
}
@media (min-width: 1025px) {
	.liste-ressources {
		grid-template-columns: repeat(4, 1fr);   /* ordinateur : 4 colonnes */
	}
}

/* Chaque extrait devient une carte : image en haut, texte dessous */
.liste-ressources .ressource {
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	overflow: hidden;
}
.liste-ressources .ressource > div {
	width: 100%;
	padding: 0;
}
.liste-ressources .ressource img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}
.liste-ressources .ressource .col-lg-8 {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 1em;
}
.liste-ressources .ressource h3 {
	font-size: 1.15em;
	margin-bottom: 0.5em;
}
.liste-ressources .ressource .button {
	margin-top: auto;            /* bouton "Lire" aligné en bas de chaque carte */
	align-self: flex-start;
}

/* ===== Pagination des ressources ===== */
.pagination-ressources {
	display: flex;
	justify-content: center;
	gap: 0.5em;
	margin: 2em 0;
}
.pagination-ressources .current {
	font-weight: bold;
	color: var(--e-global-color-accent);
}

/* ===== Hauteur fixe des textes dans les cartes ===== */
.liste-ressources .extrait {
	display: -webkit-box;
	-webkit-line-clamp: 4;        /* 4 lignes maximum */
	line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: calc(1.5em * 4);  /* garde la place même si le texte est court */
	line-height: 1.5;
	margin-bottom: 1em;
}
.liste-ressources .ressource h3 {
	display: -webkit-box;
	-webkit-line-clamp: 2;        /* titres sur 2 lignes maximum */
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: calc(1.3em * 2);
	line-height: 1.3;
}

/* ============== Grille des contacts  ============== */
.contact-table{
    max-width: 1200px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
.contact-table > *{
	padding: 10px;
}

/* Trait sous chaque paragraphe (ordinateur) */
.contact-table > * {
    border-bottom: 1px solid var(--e-global-color-text);
}

/* Lignes impaires : couleur primaire */
.contact-table > :nth-child(6n+1),
.contact-table > :nth-child(6n+2),
.contact-table > :nth-child(6n+3) {
    background-color: #6B6E5040;
}

/* Lignes paires : couleur secondaire */
.contact-table > :nth-child(6n+4),
.contact-table > :nth-child(6n+5),
.contact-table > :nth-child(6n+6) {
    background-color: #EB907C7A;
}

/* Mobile : trait seulement sous le 3e paragraphe de chaque ligne */
@media (max-width: 767px) {
    .contact-table > * {
        border-bottom: none;
    }
    .contact-table > :nth-child(3n) {
        border-bottom: 1px solid var(--e-global-color-text);
    }
}