/*
 Theme Name: 	FabLab Sion custom Theme
 Description: 	Theme enfant pour le site du FabLab Sion.
 Author: 		Lucas Délèze
 Author URI: 	numeriques.ch
 Template: 		twentytwentyfive
 Version: 		1.0.0
 License:      	GNU General Public License v2 or later
 License URI:  	http://www.gnu.org/licenses/gpl-2.0.html
 Tags:         	light, dark, two-columns, responsive-layout, accessibility-ready
 Text Domain:  	twentytwentyfive-child
*/

/*

h1 = 180px : var(--wp--preset--font-size--custom-1)
h2 = 70px : var(--wp--preset--font-size--custom-2)
h3 = 36px : var(--wp--preset--font-size--custom-3)
h4 = 23px : var(--wp--preset--font-size--custom-4)
h5 = 30px : var(--wp--preset--font-size--custom-5)
h6 = 20px : var(--wp--preset--font-size--custom-6)

*/

html, body { overflow-x: hidden; }

h2[id], h3[id], h4[id], h5[id], h6[id] {
  scroll-margin-top: 100px; /* adapte la valeur à la hauteur de ton header */
}


/*---------------------------------------------------------------------------- CSS HERO */

.hero {
	background: url('ton-image.jpg') center/cover no-repeat;
}
.hero::after {
	content: "";
	position: absolute;
	inset: 0; /* top:0; right:0; bottom:0; left:0 */
	background: rgba(0, 0, 0, 0.5); /* voile noir à 50% */
	z-index: 1;
	border-radius: 0px 0px 32px 32px;
}
.hero > * {
	position: relative;
	z-index: 2; /* ton texte, boutons, etc. passent au-dessus du voile */
    justify-content: flex-end;
}

.hero__inner {
  min-height: 90vh;
}

/* Mobile : écrans < 728px */
@media (max-width: 727px) {
  .hero {
    position: relative;           /* utile pour ::after */
    overflow: hidden;             /* évite les débords arrondis */
    border-radius: 0 0 16px 16px; /* rayon plus doux sur mobile */
    background-position: center top;
    padding: 24px 16px;           /* respiration interne */
  }
  .hero::after {
    border-radius: 0 0 16px 16px;
    background: rgba(0, 0, 0, 0.45); /* léger assombrissement */
  }
  .hero > * {
	max-width: 100%;
  }
}

.hero-title {
    display: flex;
    flex-direction: column;
    gap: 32px;
    font-family: var(--wp--preset--font-family--sofia-sans-condensed, "Sofia Sans Condensed", sans-serif);
    text-transform: uppercase;
}

.hero-title-fablab {
    display: flex;
    width: fit-content;
    padding: 8px 24px;
    border-radius: 8px;
    font-size: var(--wp--preset--font-size--x-large, clamp(2.366rem, 2.366rem + ((1vw - 0.2rem) * 2.014), 4.38rem));
    color: var(--wp--preset--color--accent-3);
    background-color: var(--wp--preset--color--accent-2);
}

.hero-title-slogan {
    display: flex;
    flex-direction: column;
    font-size: var(--wp--preset--font-size--xx-large, clamp(4.929rem, 4.929rem + ((1vw - 0.2rem) * 6.321), 11.25rem));
    color: var(--wp--preset--color--accent-2);
    line-height: 0.9;
}

/* Mobile : écrans > 500px et < 728px */
@media (min-width: 500px) and (max-width: 728px) {
    .hero-title-slogan {
        font-size: 5rem;
    }
}

@media (max-width: 500px) {
    .hero-title-slogan {
        font-size: 3.2rem;
    }
}

.fab-content {
	padding-top: 64px;
	padding-top: 64px;
}

/* ----------------- BUTTONS -------------- */
.is-button {
    display: flex;
    align-items: center;
    gap: 8px;
	width: fit-content;
    padding: 8px 24px;
    border-radius: 8px;
    font-family: var(--wp--preset--font-family--sofia-sans-condensed, "Sofia Sans Condensed", sans-serif);
    text-decoration-thickness: 0px !important;
    text-underline-offset: 0em !important;
    text-decoration: none;
    text-transform: uppercase;
}

.red-button {
	color: var(--wp--preset--color--accent-3, #f6ddcb) !important;
	background-color: var(--wp--preset--color--accent-2) !important;
}

.white-button {
	background-color: var(--wp--preset--color--base) !important;
	color: var(--wp--preset--color--accent-2) !important;
}

.salmon-button {
	color: var(--wp--preset--color--accent-2) !important;
	background-color: var(--wp--preset--color--accent-3) !important;
}

.long-button {
    width: -webkit-fill-available;
    justify-content: space-between;
}

.tilted {
	transform: rotate(-5deg); /* change l’angle selon ton besoin */
	transform-origin: center; /* centre de rotation (par défaut) */
}

.button-validation-abonnement {
	border-radius: 8px !important;
    border: none;
}

/* Mobile : écrans < 728px */
@media (max-width: 727px) {
  /* BUTTONS */
  .is-button {
    padding: 16px 24px;
    font-size: 1.25rem;
  }

}

/* ----------------- TOOLS CARD ------------------------- */
.fab-home-tool-card {
  display: flex;
  align-items: center;
  gap: 32px;
  width: fit-content;
  background: var(--wp--preset--color--accent-3);
  border-radius: 16px;
  padding: 32px;
}

/* Grille 2x2 (1 colonne sous 728px) */
.fab-home-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 728px) {
  .fab-home-tool-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
	.fab-home-tool-card {
		flex-direction: column;
	}
	
	.fab-home-tool-grid {
		display: flex;
		flex-direction: column;
	}
}

@media (max-width: 728px) {
	.fab-home-tool-grid {
		display: flex;
		flex-direction: column;
	}
}

.fab-home-tool-card svg {
	color: var(--wp--preset--color--accent-1);
	min-width: 150px;
}
.fab-home-tool-card h3 {
	margin: 0px 0px 16px;
}

.cta-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--wp--preset--color--accent-3);
    padding: 16px;
    border-radius: 16px; 
}
.cta-card h2 {
    margin-top: 0px;
}

/* ----------------- PRICES -------------- */
.price-card {
    display:flex;
    flex-direction: column;
    justify-content: space-between;
}

.price-abo {
	font-size: var(--wp--preset--font-size--large, clamp(1.378rem, 1.378rem + ((1vw - 0.2rem) * 0.872), 2.25rem));
	font-family: var(--wp--preset--font-family--sofia-sans-condensed);
}

.conditions-abonnements summary {
	font-size: var(--wp--preset--font-size--large, clamp(1.378rem, 1.378rem + ((1vw - 0.2rem) * 0.872), 2.25rem));
	font-family: var(--wp--preset--font-family--sofia-sans-condensed);
}

/* ----------------- NINJA FORMS -------------- */

.nf-field-element input, .nf-field-element select {
    height: 32px;
    border-radius: 4px;
}

.nf-field-element textarea {
    border-radius: 4px;
}

.list-radio-wrap .nf-field-element li {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
}

/* ----------------- NEWSLETTER INFOMANIAK -------------- */
.newsletter-button {
    border: none;
}

.newsletter-banner {
    position: relative;
    bottom: -35px;    
}
.newsletter-inline {
    width: -webkit-fill-available;
    display: flex;
    align-items: center;
    gap: 8px;
}
.newsletter-input {
    width: -webkit-fill-available;
    padding: 8px 16px;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    font-size: 16px;
}
.sr-only { /* accessibilité */
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* Mobile : écrans < 728px */
@media (max-width: 727px) {
  .newsletter-inline {
    flex-direction: column;
    align-items: stretch;
  }
  .newsletter-input {
    padding: 12px 14px;
    font-size: 16px;              /* évite le zoom iOS */
  }
}

/* ----------------- FOOTER -------------- */
.som-icon {
}

.som-icon svg {
  	color: var(--wp--preset--color--accent-2) !important;
	background-color: var(--wp--preset--color--base) !important;
	border-radius: 16px;
	padding: 12px;
}

.fab-som-footer {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
	justify-content: center;
}

@media (min-width: 768px) {
	.fab-som-footer {
		justify-content: flex-end;
	}
}

.fab-nav-footer {
    display: flex !important;
    flex-direction: column-reverse;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
	gap: 0px;
}

@media (min-width: 768px) {
	.fab-nav-footer {
		justify-content: flex-end;
		flex-direction: row;
		align-items: flex-start;
	}
}

.fab-top-footer {
	display: flex !important;
    flex-direction: column;
    align-items: center;
}

.fab-footer-address {
	display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-credits {
	justify-content: center;
}

.fab-footer-eco-badge {
    flex-direction: column;
    align-items: center;
	justify-content: center;
}

.fab-footer-eco-text {
	display: flex;
    flex-direction: column;
    align-items: center;
}

@media (min-width: 450px) {
	.fab-top-footer {
		flex-direction: row;
		align-items: flex-start;
	}
	.fab-nav-footer { 
		align-items: center;
	}
	.fab-footer-address {
		align-items: flex-start;
	}
	.footer-credits {
		justify-content: space-between;
	}
	.fab-footer-eco-badge {
		flex-direction: row;
		justify-content: space-evenly;
	}
	.fab-footer-eco-text {
		align-items: self-start;
	}
	
}

.fab-mid-footer {
	gap: 32px;
}

/* --------------------------------------------------------------------------- CSS MODIFICATIONS PARTNERS GRID PAGE */
.partner-category {
	display: block;        /* s’assure que c’est un bloc plein largeur */
	width: 100%;           /* prend toute la largeur disponible du parent */
	box-sizing: border-box;/* inclut les paddings/bordures dans ce 100% */
	margin: 1.5rem 0;             /* supprime toute marge par défaut */
}

.partner-category h3 {
	margin-bottom: 1rem;
	display:none;
}

/* façon list plus économe sur la DOM */
.partner-list {
	list-style: none;
	margin: 0;
	padding: 0 24px 0 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 1rem;
}

.partner-list li {
    
}

.c-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	background: var(--wp--preset--color--base, #fefffe);
	border-radius: 8px;
	padding: 1rem;
	box-shadow: 0 4px 12px rgba(0,0,0,0.05);
	text-decoration: none;
	color: inherit;
	transition: transform .2s, box-shadow .2s;
	min-height: 100px;
    justify-content: space-evenly;
}

.c-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.c-card__img {
	max-width: 120px;
	height: auto;
	margin-bottom: .5rem;
	object-fit: contain;
}

.c-card__title {
	display: block;
	font-weight: 500;
	margin-top: .25rem;
	color: var(--wp--preset--color--accent-1);
	font-family: var(--wp--preset--font-family--league-spartan, "League Spartan");
	font-size: 1rem;
}