body{
    background-color: #D2B48C; /* fallback si l'image ne charge pas */
    background-image: url('../assets/img/ressources/fond.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    margin: 0;
    padding: 0;
    font-family: 'Rockwell', 'Rockwell Std', 'Rockwell Nova', 'Serifa', Georgia, 'Times New Roman', serif;
    overflow-x: hidden; /* évite tout débordement horizontal sur mobile */
}

:root {
    --mascotte-reveal: 0;
    --mascotte-hidden-shift: 325px; /* hauteur à cacher (ajuste selon ton image) */
  }

.site-header{
    /* fond rendu via ::before pour contrôler l’opacité sans affecter le contenu */
    background: transparent;
    color: #fff;
    font-family: 'Rockwell', 'Rockwell Std', 'Rockwell Nova', 'Serifa', Georgia, 'Times New Roman', serif;
    position: fixed; /* toujours visible */
    top: 0; left: 0; right: 0;
    z-index: 7000;
}

.site-header::before{
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.73; /* 73% */
    background-color: #9b866b;
    background-image: linear-gradient(90deg, #9b866b, #a79070, #9b866b);
    background-size: 200% 100%;
    animation: headerGradient 12s ease-in-out infinite;
}

/* Espace réservé pour ne pas masquer le contenu sous le header fixé */
body.has-fixed-header{ padding-top: var(--header-height, 72px); }

.site-header .header-inner{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
    padding-right: 56px;
    position: relative;
    z-index: 1; /* au-dessus du ::before */
}

.brand{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
}

.brand-logo{
    height: 70px;
    width: auto;
    transition: transform 200ms ease;
}

.brand-text{
    font-weight: 700;
    letter-spacing: 1px;
}

.brand:hover .brand-logo{
    transform: scale(1.06) rotate(-2deg);
}

/* Click animation on logo */
.brand-logo.is-clicking{
    animation: logoClick 650ms ease both;
}

@keyframes logoClick{
    0%{ transform: scale(1) rotate(0); filter: brightness(1); }
    20%{ transform: scale(1.12) rotate(-6deg); filter: brightness(1.1); }
    45%{ transform: scale(0.96) rotate(3deg); }
    70%{ transform: scale(1.06) rotate(-2deg); }
    100%{ transform: scale(1) rotate(0); filter: brightness(1); }
}

.main-nav{
    display: inline-flex;
    align-items: center;
    gap: 25px;
}

.nav-link{
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 20px;
    position: relative;
    transition: color 180ms ease, transform 180ms ease;
}

.nav-link:hover{
    color: #ffd38a;
    transform: translateY(-1px);
}

.nav-link.active{
    color: #d8a35b;
}

/* Lien Photos mis en avant en rouge */
.nav-link.photos-link{
    color: #ff4040 !important;
    font-weight: 800;
    text-shadow: 0 0 10px rgba(255,64,64,0.8);
    animation: pulse-red 2s ease-in-out infinite;
}

.nav-link.photos-link:hover{
    color: #ff7070 !important;
    text-shadow: 0 0 15px rgba(255,64,64,1);
}

@keyframes pulse-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}

.sep{
    color: #e7d9c7;
    opacity: 0.8;
}

/* Hide mobile-only close button on desktop */
.nav-close{ display: none; }

/* Burger button */
.menu-toggle{
    display: none;
    background: transparent;
    border: 0;
    padding: 8px;
    cursor: pointer;
}
.menu-toggle .bar{
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    margin: 5px 0;
    transition: transform 260ms ease, opacity 260ms ease;
}

/* Responsive nav */
@media (max-width: 880px){
    .menu-toggle{ display: inline-block; }
    /* Backdrop clickable */
    .nav-backdrop{
        position: fixed; ; z-index: 8999;
        background: rgba(0,0,0,0.35);
        opacity: 0; visibility: hidden;
        transition: opacity 420ms ease, visibility 0s linear 420ms;
    }
    body.nav-open .nav-backdrop{ opacity: 1; visibility: visible; transition: opacity 420ms ease; }

    /* Side drawer */
    .main-nav{
        position: fixed; top: 0; right: 0; bottom: 0; z-index: 9999;
        width: clamp(280px, 82vw, 520px);
        /* Ancient papyrus look */
        background-color: #efe2bf;
        background-image:
          /* fiber streaks */
          repeating-linear-gradient(0deg, rgba(100,69,15,0.06) 0 2px, transparent 3px 14px),
          /* horizontal aging lines */
          repeating-linear-gradient(90deg, rgba(100,69,15,0.045) 0 1px, transparent 2px 10px),
          /* edge burn */
          radial-gradient(1200px 400px at 100% 0%, rgba(0,0,0,0.08), transparent 65%),
          linear-gradient(90deg, rgba(165,141,99,0.22), rgba(199,170,120,0.18));
        box-shadow: -24px 0 36px rgba(0,0,0,0.35), inset 0 0 18px rgba(82,58,20,0.25);
        border-left: 3px solid rgba(120,90,40,0.45);
        visibility: hidden; opacity: 0;
        transform: translateX(100%);
        transition: transform 420ms cubic-bezier(.22,.61,.36,1), opacity 420ms ease, visibility 0s linear 420ms;
        display: flex; flex-direction: column; align-items: flex-start;
        gap: 18px;
        padding: calc(16px + env(safe-area-inset-top)) 22px 28px 22px;
        -webkit-overflow-scrolling: touch; overflow-y: auto;
        pointer-events: none;
    }
    /* Decorative side motif (columns) */
    .main-nav::before{
        content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 14px;
        background:
          repeating-linear-gradient(0deg, rgba(92,67,28,0.3) 0 8px, transparent 8px 16px);
        opacity: 0.4;
    }
    .header-inner{ position: relative; }
    .sep{ display: none; }
    .nav-link{ font-size: 18px; padding: 6px 2px; }

    /* Close button inside drawer */
    .nav-close{
        align-self: flex-end; margin: 4px 0 8px 0; border: 0; background: transparent; color: #4b3b22;
        font-size: 28px; line-height: 1; cursor: pointer; padding: 6px; border-radius: 6px;
        transition: transform 160ms ease;
    }
    .nav-close:active{ transform: scale(0.95); }

    /* Egyptian-style links inside drawer */
    .main-nav .nav-link{
        font-family: 'Caesar Dressing', cursive;
        color: #3f2f18;
        letter-spacing: 1.5px;
        text-transform: uppercase;
        padding: 6px 10px;
        border-radius: 6px;
        position: relative;
    }
    .main-nav .nav-link:hover{
        color: #654416;
        background: linear-gradient(180deg, rgba(240,218,160,0.65), rgba(233,205,140,0.55));
        box-shadow: inset 0 0 0 2px rgba(128,96,40,0.35), 0 2px 0 rgba(0,0,0,0.08);
    }
    /* Lien Photos en rouge dans le menu mobile */
    .main-nav .nav-link.photos-link{
        color: #ff4040 !important;
        font-weight: 800;
        text-shadow: 0 0 8px rgba(255,64,64,0.6);
    }
    .main-nav .nav-link.photos-link:hover{
        color: #ff7070 !important;
        background: linear-gradient(180deg, rgba(255,200,200,0.65), rgba(255,180,180,0.55));
    }
    /* small cartouche ornament */
    .main-nav .nav-link::before{
        content: ""; position: absolute; left: -12px; top: 50%; width: 8px; height: 8px; transform: translateY(-50%);
        background: radial-gradient(circle at 30% 30%, #caa253 0 40%, #8a6a2e 41% 100%);
        border-radius: 50%; box-shadow: 0 0 0 1px rgba(80,60,20,0.4);
    }

    /* link reveal animation (stagger) */
    .main-nav .nav-link{ opacity: 0; transform: translateY(-6px); transition: transform 300ms ease, opacity 300ms ease; }
    .main-nav .nav-link:nth-of-type(1){ transition-delay: 100ms; }
    .main-nav .nav-link:nth-of-type(2){ transition-delay: 150ms; }
    .main-nav .nav-link:nth-of-type(3){ transition-delay: 200ms; }
    .main-nav .nav-link:nth-of-type(4){ transition-delay: 250ms; }

    /* open state */
    body.nav-open .main-nav{
        visibility: visible; opacity: 1;
        transform: translateX(0);
        transition: transform 460ms cubic-bezier(.22,.61,.36,1), opacity 420ms ease;
        pointer-events: auto; display: flex;
    }
    
    /* lock scroll on body when menu open */
    body.nav-open{ overflow: hidden; }
    body.nav-open .main-nav .nav-link{ opacity: 1; transform: translateY(0); }

    /* animate burger to X */
    body.nav-open .menu-toggle .bar:nth-child(1){ transform: translateY(7px) rotate(45deg); }
    body.nav-open .menu-toggle .bar:nth-child(2){ opacity: 0; }
    body.nav-open .menu-toggle .bar:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }
}

/* Animated underline for links */
.nav-link::after{
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 200ms ease;
}

.nav-link:hover::after, .nav-link.active::after{
    transform: scaleX(1);
}

/* Subtle animated gradient */
@keyframes headerGradient{
    0%{ background-position: 0% 50%; }
    50%{ background-position: 100% 50%; }
    100%{ background-position: 0% 50%; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
    .site-header{ animation: none; }
    .brand-logo, .nav-link{ transition: none; }
}

/* ---- Hero two-column section ---- */
.hero{
    padding: 56px 45px;
    color: #ffffff;
}

.hero-inner{
    max-width: 1500px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: center;
    justify-items: center;
    padding: 0 20px;
}

.hero-title{ margin: 0 auto 32px auto; line-height: 1.1; text-align: center; }
.hero-title{ font-family: 'Caesar Dressing', cursive; --hero-offset: 0px; }
.hero-title .line1{ display: block; font-size: 120px; font-weight: 400; letter-spacing: 1px; margin-left: auto; margin-right: auto; opacity: 0; transform: translateY(12px) scale(0.98); }
.hero-title .line2{ display: block; font-size: 90px; font-weight: 400; letter-spacing: 1px; margin-left: auto; margin-right: auto; margin-top: 10px; opacity: 0; transform: translateY(12px) scale(0.98); }

/* Play title animation only after page load */
body.page-loaded .hero-title .line1{ animation: titleReveal 1200ms cubic-bezier(.22,.61,.36,1) forwards; }
body.page-loaded .hero-title .line2{ animation: titleReveal 1200ms cubic-bezier(.22,.61,.36,1) 240ms forwards; }

@keyframes titleReveal{
    from{ opacity: 0; transform: translateY(12px) scale(0.98); filter: blur(1px); }
    60%{ opacity: 1; transform: translateY(0) scale(1.005); filter: blur(0); }
    to{ opacity: 1; transform: translateY(0) scale(1); }
}

.hero-copy{ font-size: 15px; line-height: 1.6; color: black; text-align: center; }
.hero-copy p{ margin: 0 auto 9px auto; max-width: 70ch; text-align: center; }
.hero-copy{
    position: relative;
    background-image: url('../assets/img/ressources/fondparchemin.png');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    padding: 122px 128px;
    border-radius: 8px;
}
.hero-points{ 
    font-size: 15px;
    list-style: none; 
    padding-left: 0; 
    margin: 10px 0 0 0; 
}
.hero-points li{ 
    position: relative; 
    padding-left: 28px; 
    margin: 8px 0; 
    max-width: 62ch;
}
.hero-points li::before{
    content: ""; 
    position: absolute; 
    left: 0; top: 8px; 
    width: 14px; height: 14px; 
    border-radius: 20px; 
    background: linear-gradient(180deg, #ffe1a0, #e1b86a); 
    box-shadow: 0 1px 0 rgba(0,0,0,0.25), inset 0 0 0 1px rgba(90,60,20,0.35);
}
em{
    color: red;
    font-weight: 550;

}
@media (max-width: 980px){
    .hero-copy{ 
        font-size: 14px; 
        padding: 40px 28px; /* réduit le padding pour petits écrans */
        background-size: contain;
    }
    .hero-points{ font-size: 14px; }
}

.hero-media{ justify-self: center; width: 100%; }
.hero-image{
    width: 100%;
    height: auto;
    max-width: 560px;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    margin: 0 auto;
    display: block;
    animation: heroKenBurns 10s ease-in-out infinite alternate;
    will-change: transform;
    transform-origin: center center;
}   

@keyframes heroKenBurns{
    0%{ transform: translateY(0) translateX(0) scale(0.9); }
    100%{ transform: translateY(-20px) translateX(0) scale(1.03); }
}

/* ---- Mascotte collée au bord gauche ---- */
.mascotte{
	position: fixed;
	left: 18px;
	bottom: 0;
	z-index: 1000;
	pointer-events: none; /* ne bloque jamais les clics sur la page */
    transform: translateY(calc((1 - var(--mascotte-reveal)) * var(--mascotte-hidden-shift)));
    transition: transform 220ms linear, opacity 220ms linear;
}

.mascotte img{
	display: block;
	height: min(50vh, 560px);
	width: auto;
}

@media (max-width: 980px){
	.mascotte{ left: 10px; }
	.mascotte img{ height: min(50vh, 460px); }
}

@media (prefers-reduced-motion: reduce){
	.mascotte{ transition: none; opacity: 1 !important; }
	.hero-image{ animation: none; }
}

/* Responsive */
@media (max-width: 980px){
    .hero-inner{ grid-template-columns: 1fr; gap: 24px; padding: 0 15px; }
    .hero-title .line1{ font-size: 44px; }
    .hero-title{ --hero-offset: 0px; }
    .hero-title .line2{ font-size: 38px; }
    .hero-media{ justify-self: center; width: 100%; }
    .hero-image{ max-width: 100%; display: block; margin: 0 auto; animation: heroKenBurnsMobile 20s ease-in-out infinite alternate; }
    .hero-text{ text-align: center; width: 100%; }
}

@keyframes heroKenBurnsMobile{
    0%{ transform: translateY(0) scale(1); }
    100%{ transform: translateY(-10px) scale(1.03); }
}

/* ---- Optimisations smartphone ---- */
@media (max-width: 560px){
    .site-header .header-inner{ padding: calc(10px + env(safe-area-inset-top)) 12px 10px 12px; padding-right: 44px; }
    .hero{ padding: 32px 18px; }
    .hero-copy{ 
        font-size: 14px; 
        padding: 60px 30px; /* encore plus compact pour très petits écrans */
        background-size: cover; /* remplit mieux la zone sur mobile étroit */
        background-position: center;
    }
    .hero-points{ font-size: 13.5px; }
    .domains-title{ margin: 28px 0 14px 0; font-size: clamp(28px, 9vw, 44px); }
    .domains-grid{ grid-template-columns: 1fr; gap: 14px; padding: 0 14px; }
    .domain-card .card-title{ left: 10px; right: 10px; bottom: 10px; font-size: clamp(18px, 6vw, 26px); }
    .mascotte img{ height: min(30vh, 380px); }
}

/* ---- Titre "Nos domaines" ---- */
.domains-title{
	font-family: 'Caesar Dressing', cursive;
	text-align: center;
	color: #ffffff;
	font-size: clamp(36px, 6vw, 72px);
	letter-spacing: 1px;
	margin: 40px 0 20px 0;
}

/* ---- Grille des domaines ---- */
.domains-grid{
	max-width: 1500px;
	margin: 12px auto 40px auto;
	padding: 0 45px;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 22px;
}

.domain-card{
	position: relative;
	background: #c9ae82;
	/* Image de fond configurable via --bg ; sinon dégradé interne */
	background-image: linear-gradient(135deg, rgba(0,0,0,0.06), rgba(0,0,0,0.18));
	background-size: cover;
	background-position: center;
	border-radius: 10px;
	box-shadow: 0 10px 24px rgba(0,0,0,0.25);
	overflow: hidden;
	/* rectangle proportion 4:3 */
	aspect-ratio: 4 / 3;
	transform: translateZ(0);
	transition: transform 220ms ease, box-shadow 220ms ease;
}

.domain-card .card-image{
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover; object-position: center;
    display: block;
}

.domain-card .card-overlay{
	position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.35));
    transition: background-color 0.3s ease;
    pointer-events: none; /* laisse passer les clics vers le lien sous-jacent */
}

.domain-card .card-content {
    position: absolute;
    inset: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #fff;
    z-index: 2;
    pointer-events: none; /* laisse passer les clics vers le lien sous-jacent */
}

.domain-card .card-title{
    text-align: right;
    font-family: 'Caesar Dressing', cursive;
    color: #fff;
    font-size: clamp(20px, 2.4vw, 34px);
    letter-spacing: 1px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.45);
    transition: transform 0.3s ease;
}

.domains-grid .domain-card:nth-child(1) .card-title{ color: #db6102; }   /* Design graphique */
.domains-grid .domain-card:nth-child(2) .card-title{ color: #fab200; }   /* Multimédia */
.domains-grid .domain-card:nth-child(3) .card-title{ color: #a50b73; }   /* Marketing */
.domains-grid .domain-card:nth-child(4) .card-title{ color: #203d91; }   /* Informatique */
.domains-grid .domain-card:nth-child(5) .card-title{ color: #fff; }   /* Gestion de projet */
.domains-grid .domain-card:nth-child(6) .card-title{ color: #711981; }   /* Administration */

.domain-card .card-description {
    font-size: 16px;
    line-height: 1.4;
    margin-top: 12px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    display: none;
}

/* Hover effect sur desktop */
@media (hover: hover) {
    .domain-card:hover .card-overlay {
        background: linear-gradient(180deg, rgba(0,0,0,0.3), rgba(0,0,0,0.75));
        transition: background 0.4s ease-out;
    }

    .domain-card:hover .card-description {
        opacity: 1;
        transform: translateY(0);
        display: block;
        transition-delay: 0.1s;
    }

    .domain-card:hover .card-title {
        transform: translateY(-8px);
        transition: transform 0.5s ease-out;
        transition-delay: 0.05s;
    }
}

/* Click effect sur mobile */
@media (hover: none) {
    .domain-card {
        cursor: pointer;
    }

    .domain-card.is-active .card-overlay {
        background: linear-gradient(180deg, rgba(0,0,0,0.3), rgba(0,0,0,0.75));
    }

    .domain-card.is-active .card-description {
        opacity: 1;
        transform: translateY(0);
        display: block;
    }

    .domain-card.is-active .card-title {
        transform: translateY(-8px);
    }
}

.domain-card:hover{
	transform: translateY(-3px);
	box-shadow: 0 16px 30px rgba(0,0,0,0.3);
}

@media (max-width: 1100px){
	.domains-grid{ grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px){
	.domains-grid{ grid-template-columns: 1fr; padding: 0 24px; }
}

/* ---- CTA sous la grille ---- */
.domains-cta{ display: flex; justify-content: center; margin: 18px 0 6px 0; }
.btn-projects{
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 22px;
    border-radius: 999px;
    text-decoration: none;
    font-family: 'Caesar Dressing', cursive;
    text-transform: uppercase; letter-spacing: 1.2px;
    color: #2b210f;
    background-image: linear-gradient(180deg, #f3e3ae, #e5c97f 60%, #d2b166);
    border: 1.5px solid rgba(80,58,20,0.5);
    box-shadow: 0 3px 0 rgba(0,0,0,0.22);
}
.btn-projects::before, .btn-projects::after{
    content: ""; position: absolute; top: 50%; width: 8px; height: 8px; border-radius: 50%; transform: translateY(-50%);
    background: radial-gradient(circle at 30% 30%, #caa253 0 40%, #8a6a2e 41% 100%);
    box-shadow: 0 0 0 1px rgba(80,60,20,0.35);
    opacity: 0.85;
}
.btn-projects::before{ left: -10px; }
.btn-projects::after{ right: -10px; }
.btn-projects:hover{ filter: saturate(1.03); transform: translateY(-1px); }
.btn-projects:active{ transform: translateY(0); }
.btn-projects:focus-visible{ outline: 2px solid rgba(60,40,10,0.5); outline-offset: 2px; }

/* ---- Footer ---- */
.site-footer{
    margin-top: 40px;
    background-color: #a88138;
    color: #2b210f;
    position: relative;
    /* dunes: en haut (arrondi) et en fond */
    background-image:
        /* Dunes qui forment le bord supérieur arrondi */
        radial-gradient(70px 70px at 6% 0, #a88138 99%, rgba(0,0,0,0) 100%),
        radial-gradient(95px 95px at 24% 0, #a88138 99%, rgba(0,0,0,0) 100%),
        radial-gradient(80px 80px at 42% 0, #a88138 99%, rgba(0,0,0,0) 100%),
        radial-gradient(110px 110px at 62% 0, #a88138 99%, rgba(0,0,0,0) 100%),
        radial-gradient(85px 85px at 80% 0, #a88138 99%, rgba(0,0,0,0) 100%),
        radial-gradient(70px 70px at 96% 0, #a88138 99%, rgba(0,0,0,0) 100%),
        /* Dunes de fond au bas pour la profondeur */
        radial-gradient(60px 60px at 10% 100%, rgba(125,87,25,0.65) 60%, rgba(0,0,0,0) 61%),
        radial-gradient(75px 75px at 28% 100%, rgba(125,87,25,0.65) 60%, rgba(0,0,0,0) 61%),
        radial-gradient(85px 85px at 46% 100%, rgba(125,87,25,0.65) 60%, rgba(0,0,0,0) 61%),
        radial-gradient(95px 95px at 64% 100%, rgba(125,87,25,0.65) 60%, rgba(0,0,0,0) 61%),
        radial-gradient(75px 75px at 82% 100%, rgba(125,87,25,0.65) 60%, rgba(0,0,0,0) 61%),
        linear-gradient(0deg, rgba(0,0,0,0.08), rgba(0,0,0,0.00));
}

.site-footer .footer-inner{
    max-width: 1500px;
    margin: 0 auto;
    padding: 12px 24px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
}

.footer-logo{ height: 40px; width: auto; display: block; }

.footer-nav{ display: flex; justify-content: center; gap: 10px }
.footer-pill{
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 8px 18px;
    border-radius: 999px;
    text-decoration: none;
    /* Cartouche égyptienne */
    font-family: 'Caesar Dressing', cursive;
    text-transform: uppercase; letter-spacing: 1px;
    color: #2b210f;
    background-image: linear-gradient(180deg, #f3e3ae, #e5c97f 60%, #d2b166);
    border: 1.5px solid rgba(80,58,20,0.5);
    box-shadow: 0 2px 0 rgba(0,0,0,0.22);
}
.footer-pill::before, .footer-pill::after{
    content: ""; position: absolute; top: 50%; width: 6px; height: 6px; border-radius: 50%; transform: translateY(-50%);
    background: radial-gradient(circle at 30% 30%, #caa253 0 40%, #8a6a2e 41% 100%);
    box-shadow: 0 0 0 1px rgba(80,60,20,0.35);
    opacity: 0.85;
}
.footer-pill::before{ left: -8px; }
.footer-pill::after{ right: -8px; }
.footer-pill:hover{ filter: saturate(1.03); transform: translateY(-1px); box-shadow: 0 3px 0 rgba(0,0,0,0.25); }
.footer-pill:active{ transform: translateY(0); box-shadow: 0 1px 0 rgba(0,0,0,0.22); }
.footer-pill:focus-visible{ outline: 2px solid rgba(60,40,10,0.5); outline-offset: 2px; }

.footer-social{ list-style: none; display: flex; gap: 10px; padding: 0; margin: 0; }
.social-btn{
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 28px; padding: 4px 0; border-radius: 6px;
    color: #2b210f; text-decoration: none; border: 2px solid #2b210f;
    background: rgba(255,255,255,0.35);
}
.social-btn svg{ width: 16px; height: 16px; fill: currentColor; display: block; }

@media (max-width: 700px){
    .site-footer .footer-inner{ grid-template-columns: 1fr; gap: 12px; padding: 16px; justify-items: center; text-align: center; }
    .footer-left{ justify-self: center; }
    .footer-nav{ justify-content: center; flex-wrap: wrap; gap: 10px; }
    .footer-social{ justify-content: center; }
}

/* Espace plus grand entre les 3 boutons du footer sur desktop */
@media (min-width: 701px){
    .site-footer .footer-nav{
        gap: 0; /* on gère l'espacement autrement pour compatibilité */
        flex-wrap: nowrap;
        justify-content: space-between; /* répartit sur toute la largeur dispo */
        width: min(100%, 640px); /* largeur contrôlée pour espacement visible */
        margin: 0 auto;
    }
    /* Neutralise d'éventuels margins précédents et empêche l'étirement */
    .site-footer .footer-nav > *{ margin-left: 0 !important; flex: 0 0 auto; }
}

@media (max-width: 560px){
    .site-footer{
        background-image:
            radial-gradient(50px 50px at 8% 0, #a88138 99%, rgba(0,0,0,0) 100%),
            radial-gradient(70px 70px at 30% 0, #a88138 99%, rgba(0,0,0,0) 100%),
            radial-gradient(72px 72px at 54% 0, #a88138 99%, rgba(0,0,0,0) 100%),
            radial-gradient(60px 60px at 78% 0, #a88138 99%, rgba(0,0,0,0) 100%),
            radial-gradient(55px 55px at 94% 0, #a88138 99%, rgba(0,0,0,0) 100%),
            radial-gradient(48px 48px at 14% 100%, rgba(125,87,25,0.65) 60%, rgba(0,0,0,0) 61%),
            radial-gradient(62px 62px at 46% 100%, rgba(125,87,25,0.65) 60%, rgba(0,0,0,0) 61%),
            radial-gradient(56px 56px at 78% 100%, rgba(125,87,25,0.65) 60%, rgba(0,0,0,0) 61%),
            linear-gradient(0deg, rgba(0,0,0,0.08), rgba(0,0,0,0.00));
    }
}

/* ---- Bouton retour en haut ---- */
.back-to-top{
    position: fixed;
    right: calc(16px + env(safe-area-inset-right));
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 6500;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1.5px solid rgba(80,58,20,0.5);
    background-image: linear-gradient(180deg, #f3e3ae, #e5c97f 60%, #d2b166);
    color: #2b210f;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 0 rgba(0,0,0,0.22), 0 8px 18px rgba(0,0,0,0.25);
    opacity: 0;
    transform: translateY(10px);
    visibility: hidden;
    transition: opacity 220ms ease, transform 220ms ease, visibility 0s linear 220ms;
}
.back-to-top.is-visible{
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 220ms ease, transform 220ms ease;
}
.back-to-top:hover{ transform: translateY(-2px); }
.back-to-top:active{ transform: translateY(0); }
.back-to-top:focus-visible{ outline: 2px solid rgba(60,40,10,0.5); outline-offset: 2px; }
@media (max-width: 560px){
    .back-to-top{ width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce){
    .back-to-top{ transition: none; }
}