/* ========================================
   POLICE - LEXEND (Hébergée localement)
   Choisie pour ses qualités de lisibilité et
   d'accessibilité cognitive : cohérent avec la
   philosophie d'un numérique doux et inclusif.
   ======================================== */
@font-face {
    font-family: 'Lexend';
    src: url('../fonts/Lexend-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ========================================
   VARIABLES DE COULEURS - DOUCEUR SOLAIRE
   ======================================== */
:root {
    --fond-principal: #1e4238;
    /* vert foncé profond, nouveau fond principal du site */
    --texte-principal: #F4F1EA;
    /* beige très clair, texte principal sur fond sombre */
    --texte-secondaire: #C9C2B5;
    /* beige grisé, texte secondaire */
    --couleur-accent: #E37A52;
    /* terracotta éclairci, accent unique (CTA, titres, liens) */
    --couleur-secondaire: #E37A52;
    /* même terracotta : accent unique sur tout le site */
    --couleur-bouton: #A8502F;
    /* terracotta foncé, fond des boutons au repos (contraste 4.8:1 avec le texte clair) */
    --couleur-accent-survol: #87391F;
    /* terracotta plus foncé, fond au survol des boutons et du menu (contraste 7:1) */
    --fond-section: #254f43;
    /* vert légèrement plus clair, alternance de sections */
    --blanc: #2a5a4c;
    /* vert clair, sert de fond de "carte" (nom de variable conservé) */
    --blob-vert-clair: #3d7a68;
    /* vert lumineux, réservé aux taches d'arrière-plan (n'affecte ni texte ni liens) */
}

/* ========================================
   RESET ET BASE
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--fond-principal);
    color: var(--texte-principal);
    font-family: 'Lexend', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    font-size: 16px;
    position: relative;
    overflow-x: hidden;
    /* Footer toujours en bas, même sur les pages courtes */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========================================
   TACHES COLORÉES EN ARRIÈRE-PLAN
   Formes organiques douces, fixes au scroll,
   très faible opacité pour ne jamais nuire
   à la lisibilité du texte.
   Chaque page applique une classe sur <body>
   pour moduler couleur, taille et position :
   voir section "VARIANTES PAR PAGE" plus bas.
   ======================================== */
body::before,
body::after {
    content: "";
    position: fixed;
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
    pointer-events: none;
}

/* Défaut discret : équilibre terracotta/teal (utilisé par apropos.php) */
body::before {
    width: 500px;
    height: 500px;
    top: -150px;
    left: -150px;
    background: var(--couleur-accent);
    opacity: 0.12;
}

body::after {
    width: 600px;
    height: 600px;
    bottom: -200px;
    right: -200px;
    background: var(--blob-vert-clair);
    opacity: 0.10;
}

/* ========================================
   VARIANTES PAR PAGE
   ======================================== */

/* ACCUEIL : accueillant, terracotta dominant, asymétrique */
body.theme-accueil::before {
    width: 650px;
    height: 650px;
    top: -200px;
    left: -180px;
    background: var(--couleur-accent);
    opacity: 0.16;
}

body.theme-accueil::after {
    width: 450px;
    height: 450px;
    bottom: -150px;
    right: -100px;
    background: var(--blob-vert-clair);
    opacity: 0.08;
}

.offer-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 950px;
    margin: 0 auto;
}

.offer-item {
    display: flex;
    align-items: flex-start;
    gap: 25px;
    padding: 25px 30px;
    background-color: var(--blanc);
    border-radius: 12px;
}

.offer-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--couleur-accent);
    flex-shrink: 0;
    line-height: 1;
}

.offer-text h3 {
    margin-bottom: 8px;
}

.offer-text p {
    margin-bottom: 0;
    text-align: left;
    max-width: none;
}

/* SERVICES : sérieux, confiance, teal dominant en haut */
body.theme-services::before {
    width: 550px;
    height: 550px;
    top: -180px;
    right: -150px;
    left: auto;
    background: var(--blob-vert-clair);
    opacity: 0.13;
}

body.theme-services::after {
    width: 350px;
    height: 350px;
    bottom: -120px;
    left: -100px;
    right: auto;
    background: var(--couleur-accent);
    opacity: 0.07;
}


/* PROJETS : créatif, vivant, trois taches */
body.theme-projets::before {
    width: 450px;
    height: 450px;
    top: -120px;
    left: -120px;
    background: var(--couleur-accent);
    opacity: 0.13;
}

body.theme-projets::after {
    width: 400px;
    height: 400px;
    bottom: -100px;
    right: -120px;
    background: var(--blob-vert-clair);
    opacity: 0.12;
}

body.theme-projets .blob-extra {
    display: block;
    position: fixed;
    top: 40%;
    right: 10%;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    filter: blur(60px);
    background: var(--couleur-accent);
    opacity: 0.08;
    z-index: -1;
    pointer-events: none;
}

/* CONTACT : apaisant, une seule tache douce en bas */
body.theme-contact::before {
    content: none;
}

body.theme-contact::after {
    width: 500px;
    height: 500px;
    bottom: -180px;
    right: -150px;
    background: var(--blob-vert-clair);
    opacity: 0.10;
}

/* PAGES LÉGALES : neutre, sobre, aucune tache */
body.theme-legal::before,
body.theme-legal::after {
    content: none;
}

/* ========================================
   ACCESSIBILITÉ - FOCUS CLAVIER VISIBLE
   Appliqué globalement à tout élément
   interactif, pas seulement au bouton du
   formulaire de contact.
   ======================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--couleur-secondaire);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */
header {
    background-color: var(--blanc);
    padding: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

nav ul {
    list-style-type: none;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

nav ul li {
    margin: 0 10px;
}

nav ul li a {
    display: inline-block;
    text-decoration: none;
    color: var(--texte-principal);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 10px 15px;
    border-radius: 5px;
    transition: color 0.3s ease, background-color 0.3s ease;
}

/* Page en cours : signalée par aria-current dans le HTML */
nav ul li a[aria-current="page"] {
    color: var(--couleur-accent);
}

nav ul li a:hover {
    color: var(--texte-principal);
    background-color: var(--couleur-accent-survol);
}

/* Bouton du menu : caché sur desktop */
.menu-toggle {
    display: none;
}

/* ========================================
   CONTENU PRINCIPAL
   ======================================== */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 20px;
    width: 100%;
    /* Prend tout l'espace libre pour pousser le footer en bas */
    flex: 1 0 auto;
}

h1 {
    color: var(--texte-principal);
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 700;
}

h2 {
    color: var(--couleur-secondaire);
    margin-bottom: 20px;
    font-size: 2rem;
    font-weight: 600;
}

h3 {
    font-weight: 600;
}

p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    text-align: left;
    max-width: 950px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   COMPOSANT : Page "à propos" (apropos.php)
   ======================================== */
.about-page {
    max-width: 1300px;
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 3rem);
}

.about-header {
    text-align: center;
    margin-bottom: 40px;
}

.about-header h1 {
    margin-bottom: 20px;
}

/* Petit trait de séparation sous l'accroche */
.about-header::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    margin: 30px auto 0;
    background-color: var(--couleur-accent);
    border-radius: 2px;
}

.about-lead {
    font-size: 1.15rem;
    font-weight: 400;
    font-style: italic;
    color: var(--couleur-secondaire);
    max-width: 60ch;
    margin: 0 auto;
    line-height: 1.5;
    text-align: center;
}

.about-banner {
    margin-bottom: 40px;
    text-align: center;
}

.about-banner-img {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.about-caption {
    font-size: 0.9rem;
    margin-top: 12px;
    font-style: italic;
    color: var(--texte-secondaire);
    text-align: center;
}

.about-intro {
    max-width: 70ch;
    margin-inline: auto;
}

.about-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}

.about-split--reverse .about-split-image {
    order: -1;
}

.about-split-text {
    flex: 1;
    min-width: 280px;
}

.about-split-text p {
    max-width: 65ch;
    line-height: 1.7;
}

.about-split-image {
    flex: 1;
    min-width: 280px;
    text-align: center;
}

.about-split-image img {
    width: 100%;
    max-width: 380px;
    border-radius: 15px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.about-philosophy {
    margin-top: 50px;
    max-width: 950px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   COMPOSANT : Bloc mis en valeur
   (utilisé dans apropos.php, services.html)
   ======================================== */
.highlight-box {
    background-color: var(--fond-section);
    padding: 30px;
    border-radius: 10px;
    margin-top: 30px;
    border-left: 5px solid var(--couleur-accent);
}

/* ========================================
   COMPOSANT : Page Contact
   ======================================== */
.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 100px;
    max-width: 1100px;
    margin: 0 auto;
}

.contact-info,
.contact-form {
    flex: 1;
    min-width: 300px;
}

/* Formulaire centré verticalement par rapport à la colonne d'infos */
.contact-form {
    align-self: center;
}

.contact-info h2,
.contact-form h2 {
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.info-item {
    margin-bottom: 30px;
    padding-left: 15px;
    border-left: 3px solid var(--couleur-accent);
}

.info-item h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--texte-principal);
}

.info-item h3 img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 8px;
}

.info-item p,
.info-item a {
    font-size: 1.1rem;
    color: var(--texte-secondaire);
    text-decoration: none;
    transition: color 0.3s ease;
}

.info-item a:hover {
    color: var(--couleur-accent);
    text-decoration: underline;
}

.availability-note {
    background-color: var(--fond-section);
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
    font-style: italic;
    font-size: 0.95rem;
    color: var(--texte-secondaire);
}

form {
    background-color: var(--blanc);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--texte-principal);
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--fond-section);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    background-color: var(--fond-principal);
    color: var(--texte-principal);
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--couleur-accent);
    background-color: var(--blanc);
}

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

button[type="submit"] {
    background-color: var(--couleur-bouton);
    color: var(--texte-principal);
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: inherit;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button[type="submit"]:hover {
    background-color: var(--couleur-accent-survol);
    transform: translateY(-2px);
}

.champ-piege {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.message-formulaire {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    background-color: var(--fond-section);
}

.message-formulaire--ok {
    border-left: 5px solid var(--texte-principal);
}

.message-formulaire--erreur {
    border-left: 5px solid var(--couleur-accent);
}

/* ========================================
   COMPOSANT : Page Projets
   ======================================== */
.projects-header {
    text-align: center;
    margin-bottom: 50px;
}

.projects-header p {
    max-width: 850px;
    margin: 0 auto;
    font-size: 1.2rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.project-card {
    background-color: var(--blanc);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}

.project-image {
    width: 100%;
    height: 200px;
    background-color: var(--fond-section);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

/* En attendant les captures d'écran : nom du projet sur fond uni */
.project-image-placeholder {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--texte-secondaire);
    letter-spacing: 0.03em;
}

.project-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.4rem;
    color: var(--texte-principal);
    margin-bottom: 10px;
    font-weight: 700;
}

.project-description {
    font-size: 1rem;
    color: var(--texte-secondaire);
    margin-bottom: 20px;
    line-height: 1.5;
    flex-grow: 1;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tech-tag {
    background-color: var(--fond-section);
    color: var(--couleur-secondaire);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.project-link {
    display: inline-block;
    text-decoration: none;
    background-color: var(--couleur-bouton);
    color: var(--texte-principal);
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

.project-link:hover {
    background-color: var(--couleur-accent-survol);
}

/* En attendant la mise en ligne : mention à la place du bouton */
.project-soon {
    align-self: flex-start;
    padding: 8px 18px;
    border: 2px dashed var(--texte-secondaire);
    border-radius: 5px;
    color: var(--texte-secondaire);
    font-style: italic;
    font-size: 0.95rem;
}

.coming-soon {
    text-align: center;
    grid-column: 1 / -1;
    padding: 40px;
    background-color: var(--fond-section);
    border-radius: 10px;
    font-style: italic;
}

/* ========================================
   COMPOSANT : Page Services
   ======================================== */
.services-header {
    text-align: center;
    margin-bottom: 50px;
}

.services-header p {
    max-width: 850px;
    margin: 0 auto;
}

section.services-block {
    max-width: 1100px;
    margin: 0 auto 70px;
    padding: 20px;
}

section.services-block h2 {
    text-align: center;
    margin-bottom: 40px;
}

.cta-block {
    text-align: center;
    margin-top: 40px;
}

.cta-block a {
    display: inline-block;
    text-decoration: none;
    background-color: var(--couleur-bouton);
    color: var(--texte-principal);
    padding: 14px 32px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.cta-block a:hover {
    background-color: var(--couleur-accent-survol);
}

/* ========================================
   COMPOSANT : Pages légales
   (mentions-legales.html, cgv.html, politique-confidentialite.html)
   ======================================== */
.legal-content {
    max-width: 950px;
    margin: 0 auto;
}

.legal-content h2 {
    margin-top: 40px;
}

.legal-content h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--texte-principal);
    font-size: 1.15rem;
}

.legal-content p,
.legal-content li {
    text-align: left;
    max-width: none;
    color: var(--texte-secondaire);
}

.legal-content a {
    color: var(--couleur-accent);
}

.legal-content a:hover {
    color: var(--texte-principal);
}

.legal-content ul,
.legal-content ol {
    margin: 0 0 20px 20px;
}

.legal-content li {
    margin-bottom: 10px;
}

.todo-note {
    background-color: var(--fond-section);
    border-left: 5px solid var(--couleur-accent);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.todo-note strong {
    color: var(--couleur-accent);
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

table.data-table th,
table.data-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--fond-section);
    font-size: 0.95rem;
    color: var(--texte-secondaire);
}

table.data-table th {
    color: var(--texte-principal);
    font-weight: 600;
}

.last-update {
    text-align: center;
    font-style: italic;
    color: var(--texte-secondaire);
    margin-top: 50px;
    font-size: 0.9rem;
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    background-color: var(--fond-section);
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
    font-size: 0.9rem;
    color: var(--texte-principal);
}

footer p {
    text-align: center;
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Liens vers les pages légales, présents sur toutes les pages */
.footer-links {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--texte-principal);
    text-decoration: none;
    margin: 0 10px;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--couleur-accent);
    text-decoration: underline;
}