/* =========================
VARIABLES GLOBALES
========================= */

:root {
--primary: #4CAF50;
--secondary: #003366;
--background: #F9F9F9;
--text: #222222;
--white: #ffffff;
--shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* =========================
RESET
========================= */

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
font-family: 'Roboto', sans-serif;
background-color: var(--background);
color: var(--text);
line-height: 1.6;
}

/* =========================
CONTAINER
========================= */

.container {
max-width: 1200px;
margin: auto;
padding: 40px 20px;
}

/* =========================
HEADER
========================= */

.site-header {
position: sticky;
top: 0;
z-index: 1000;
background: var(--background);
box-shadow: var(--shadow);
transition: transform 0.6s ease, background 0.6s ease;
}

.site-header.hidden {
transform: translateY(-100%);
}

.top-header {
display: flex;
align-items: center;
justify-content: center;
padding: 15px 20px;
background: inherit;
}

.logo-img {
height: 50px;
width: auto;
position: relative;
left: 25px;
transition: height 0.6s ease, transform 0.6s ease;
}

.site-header.hidden .logo-img {
height: 35px;
transform: translateX(-40px);
}

.site-title {
text-align: center;
transition: transform 0.6s ease, opacity 0.6s ease;
}

.site-header.hidden .site-title {
transform: translateX(-60px);
opacity: 0.7;
}

.site-title .brand-name {
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
font-size: 1.8rem;
font-weight: 700;
transition: font-size 0.6s ease;
}

.site-header.hidden .site-title .brand-name {
font-size: 1.3rem;
}

.reda {
color: var(--secondary);
}

.klab {
color: rgb(255, 149, 0);
}

.plus {
color: var(--secondary);
}

.redaklab {
display: inline-block;
border-bottom: 2px solid;
border-image: linear-gradient(to right, var(--secondary) 50%, rgb(255, 149, 0) 50%);
border-image-slice: 1;
padding: 0px 15px;
margin-bottom: 0px;
transition: padding 0.6s ease;
}

.site-header.hidden .redaklab {
padding: 0px 8px;
}

.slogan {
display: inline-block;
font-size: 0.75rem;
position: relative;
top: -5px;
margin-top: 0px;
padding-top: 0px;
color: var(--text);
transition: opacity 0.6s ease, font-size 0.6s ease;
}

.site-header.hidden .slogan {
opacity: 0;
font-size: 0;
}

/* =========================
NAVIGATION
========================= */

.hamburger-btn {
display: none;
flex-direction: column;
gap: 6px;
background: none;
border: none;
cursor: pointer;
padding: 8px;
transition: transform 0.3s ease;
position: absolute;
right: 20px;
top: 50%;
transform: translateY(-50%);
}

.hamburger-btn span {
width: 25px;
height: 3px;
background: var(--secondary);
border-radius: 2px;
transition: all 0.3s ease;
display: block;
}

.hamburger-btn.active span:nth-child(1) {
transform: rotate(45deg) translate(10px, 10px);
}

.hamburger-btn.active span:nth-child(2) {
opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
transform: rotate(-45deg) translate(8px, -8px);
}

.main-nav {
background: var(--white);
border-top: 1px solid #eee;
transition: transform 0.6s ease, opacity 0.6s ease;
overflow: hidden;
max-height: 500px;
}

.main-nav.slide-in {
transform: translateX(0);
opacity: 1;
}

.main-nav ul {
list-style: none;
display: flex;
justify-content: center;
gap: 15px;
padding: 12px 0;
flex-wrap: wrap;
}

.nav-link {
text-decoration: none;
padding: 10px 16px;
border-radius: 6px;
font-family: 'Montserrat', sans-serif;
background: var(--primary);
color: var(--white);
transition: all 0.4s ease;
display: inline-block;
font-size: 0.95rem;
border: 2px solid transparent;
}

.nav-link:hover {
background: var(--secondary);
color: var(--white);
transform: scale(1.08);
border-color: var(--primary);
}

.nav-link.active {
background: var(--secondary);
border-color: var(--primary);
color: var(--white);
font-weight: 600;
}

/* =========================
TITRES
========================= */

h2 {
text-align: center;
margin-bottom: 25px;
color: var(--secondary);
font-weight: 700;
}

h1 {
text-align: center;
margin-bottom: 25px;
color: var(--secondary);
font-weight: 700;
font-size: 2rem;
}

h3 {
margin-bottom: 15px;
color: var(--secondary);
}

/* =========================
BOUTONS
========================= */

a[class^="btn"], button {
display: inline-block;
padding: 10px 20px;
border-radius: 8px;
text-decoration: none;
font-family: 'Montserrat', sans-serif;
background: var(--primary);
color: var(--white);
border: none;
box-shadow: var(--shadow);
transition: 0.3s ease;
}

a[class^="btn"]:hover,
button:hover {
background: var(--secondary);
}

/* Focus clavier visible pour accessibilite */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
outline: 3px solid #ff9500;
outline-offset: 2px;
border-radius: 6px;
}

/* =========================
SECTIONS GÉNÉRALES
========================= */

section {
margin-bottom: 60px;
}



/* =========================
IMAGES GLOBALES – largeur 100%, hauteur proportionnelle
========================= */
img {
    width: 100%;       /* prend toute la largeur du conteneur parent */
    height: auto;      /* garde les proportions originales */
    display: block;    /* élimine l’espace sous l’image */
    border-radius: 8px;/* arrondi uniforme si souhaité */
    object-fit: cover; /* optionnel : recadre légèrement si l'image est plus grande que le conteneur */
}




/* =========================
PAGE SERVICES
========================= */


.categorie-bloc {
background: var(--white);
padding: 40px;
border-radius: 10px;
box-shadow: var(--shadow);
margin-bottom: 50px;
}

.categorie-image {
display: flex;
justify-content: center;
margin: 20px 0 30px 0;
}

.categorie-image img {
width: 75%;
height: 300px;
object-fit: cover;
}

.categorie-services .service {
margin-bottom: 30px;
}

/* =========================
PAGE FORMATIONS
========================= */

.formation-card {
display: flex;
align-items: center;
gap: 40px;
background: var(--white);
padding: 30px;
border-radius: 10px;
box-shadow: var(--shadow);
margin-bottom: 40px;
}

.formation-image img {
width: 350px;
height: 250px;
object-fit: cover;
}

.formation-content {
flex: 1;
}

/* =========================
FORMULAIRES
========================= */

form {
display: flex;
flex-direction: column;
gap: 15px;
}

fieldset {
border: 1px solid #d5d5d5;
border-radius: 8px;
padding: 20px;
}

legend {
padding: 0 8px;
font-family: 'Montserrat', sans-serif;
color: var(--secondary);
}

input, select, textarea {
padding: 10px;
border-radius: 6px;
border: 1px solid #ccc;
font-family: 'Roboto', sans-serif;
}

textarea {
resize: vertical;
min-height: 100px;
}

/* =========================
FOOTER
========================= */

footer {
background: var(--secondary);
color: var(--white);
text-align: center;
padding: 25px 10px;
margin-top: 40px;
}

footer a {
color: var(--white);
text-decoration: underline;
}

/* =========================
RESPONSIVE
========================= */

@media (max-width: 992px) {
.formation-card {
flex-direction: column;
text-align: center;
}

.formation-image img {
width: 100%;
height: auto;
}

.categorie-image img {
width: 100%;
height: auto;
}

.main-nav ul {
flex-wrap: wrap;
gap: 10px;
}

.hamburger-btn {
display: flex;
}
}

@media (max-width: 768px) {
.top-header {
padding: 12px;
position: relative;
}

.site-title .brand-name {
font-size: 1.9rem;
gap: 10px;
}

.main-nav {
display: none;
position: absolute;
top: 100%;
left: 0;
right: 0;
width: 100%;
max-height: none;
background: var(--background);
border-top: 1px solid #eee;
}

.main-nav.active {
display: block;
animation: slideDown 0.6s ease forwards;
}

@keyframes slideDown {
from {
transform: translateX(100%);
opacity: 0;
}
to {
transform: translateX(0);
opacity: 1;
}
}

.main-nav ul {
flex-direction: column;
gap: 8px;
padding: 12px;
}

.nav-link {
padding: 10px 14px;
display: block;
text-align: center;
}

.hamburger-btn {
display: flex;
}
}

@media (max-width: 600px) {
.site-title .brand-name {
font-size: 1.6rem;
gap: 8px;
flex-wrap: wrap;
}

.logo-img {
height: 45px;
}

.site-header.hidden .logo-img {
height: 30px;
}

.slogan {
top: 0;
margin-top: 8px;
font-size: 0.65rem;
}

.container {
padding: 20px 15px;
}

.main-nav ul {
flex-direction: column;
}

.main-nav {
border-top: 1px solid rgba(255, 255, 255, 0.2);
}
}

/* =========================
CORRECTIONS DESIGN
========================= */

/* 1. FORMULAIRES – limiter la largeur */

form {
max-width: 700px;
margin: 0 auto;
}

/* 2. PAGE CONTACT */

/* Centrer le contenu texte */

.contact-info {
text-align: center;
margin-bottom: 30px;
}

/* Image sous le titre et plus grande */

.contact-image {
text-align: center;
margin: 25px 0;
}

.contact-image img {
width: 60%;
max-width: 500px;
height: auto;
}

/* 3. BOUTONS SERVICES & FORMATIONS – alignés à droite */

.service a,
.formation-content a {
display: inline-block;
margin-top: 10px;
}

.service,
.formation-content {
text-align: right;
}

/* Garder les paragraphes lisibles */
.service p,
.formation-content p,
.service h3,
.formation-content h3 {
text-align: left;
}