/* Makos — Ambiances saisonnières. Palette Makos uniquement (variables du thème, valeurs de la charte en repli). */
.ambiance{
  --amb-marine:var(--bleu-marine,#102F59);
  --amb-orange:var(--orange,#F49A24);
  --amb-turquoise:var(--turquoise,#00A99D);
  --amb-blanc:var(--fond,#FFFFFF);
}

/* ---------- Bandeau festif (au-dessus de l'en-tête) ---------- */
.ambiance-bandeau{position:relative;overflow:hidden;background:var(--amb-marine);color:var(--amb-blanc);text-align:center}
.ambiance-bandeau__texte{position:relative;z-index:1;margin:0 auto;padding:11px 56px;font-size:14px;font-weight:700;letter-spacing:.02em;max-width:1240px}
.ambiance-bandeau::before,.ambiance-bandeau::after{content:"";position:absolute;top:50%;width:26px;height:26px;translate:0 -50%;background:var(--amb-orange);
  -webkit-mask:var(--amb-motif) center/contain no-repeat;mask:var(--amb-motif) center/contain no-repeat}
.ambiance-bandeau::before{left:max(16px,calc(50% - 360px))}
.ambiance-bandeau::after{right:max(16px,calc(50% - 360px));background:var(--amb-turquoise)}

/* motifs (masques) : flocon, étincelle, œuf */
.ambiance-noel{--amb-motif:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M12 2v20M3.3 7l17.4 10M3.3 17L20.7 7M9 3.5l3 2.5 3-2.5M9 20.5l3-2.5 3 2.5M3.6 10.5l3.4-1.2-.6-3.6M20.4 13.5L17 14.7l.6 3.6M3.6 13.5L7 14.7l-.6 3.6M20.4 10.5L17 9.3l.6-3.6'/%3E%3C/svg%3E")}
.ambiance-nouvel-an{--amb-motif:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1l2.6 7.4L22 11l-7.4 2.6L12 21l-2.6-7.4L2 11l7.4-2.6z'/%3E%3C/svg%3E")}
.ambiance-paques{--amb-motif:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2c4.4 0 8 6.6 8 11.5S16.4 22 12 22s-8-3.6-8-8.5S7.6 2 12 2z'/%3E%3C/svg%3E")}
.ambiance-nouvel-an .ambiance-bandeau{background:linear-gradient(90deg,var(--amb-marine),color-mix(in srgb,var(--amb-marine) 80%,var(--amb-turquoise)),var(--amb-marine))}
.ambiance-paques .ambiance-bandeau{background:var(--amb-turquoise);color:var(--amb-marine)}  /* marine sur turquoise ≈ 4,6:1 (blanc ≈ 2,9:1 refusé) */
.ambiance-paques .ambiance-bandeau::before{background:var(--amb-marine)}
.ambiance-paques .ambiance-bandeau::after{background:var(--amb-blanc)}

/* ---------- Guirlande lumineuse sous l'en-tête (Noël) ---------- */
.ambiance-noel .entete{position:relative}
.ambiance-noel .entete::after{content:"";position:absolute;left:0;right:0;bottom:-7px;height:12px;pointer-events:none;z-index:5;
  background:
    radial-gradient(circle,var(--amb-orange) 3.5px,transparent 4.5px) 0 50%/72px 12px repeat-x,
    radial-gradient(circle,var(--amb-turquoise) 3.5px,transparent 4.5px) 24px 50%/72px 12px repeat-x,
    radial-gradient(circle,var(--amb-marine) 3.5px,transparent 4.5px) 48px 50%/72px 12px repeat-x;
  animation:ambiance-guirlande 2.4s steps(3) infinite}
@keyframes ambiance-guirlande{to{background-position:24px 50%,48px 50%,72px 50%}}
/* Nouvel an : liseré doré… en orange Makos, qui brille doucement */
.ambiance-nouvel-an .entete{position:relative}
.ambiance-nouvel-an .entete::after{content:"";position:absolute;left:0;right:0;bottom:-2px;height:3px;pointer-events:none;z-index:5;
  background:linear-gradient(90deg,transparent,var(--amb-orange),var(--amb-turquoise),var(--amb-orange),transparent) 0 0/50% 100% repeat-x;
  animation:ambiance-lisere 4s linear infinite}
@keyframes ambiance-lisere{to{background-position:100% 0}}

/* ---------- Touche sur le logo ---------- */
.ambiance .entete-logo{position:relative}
.ambiance .entete-logo::after{content:"";position:absolute;pointer-events:none;background:no-repeat center/contain}
/* Noël : bonnet orange Makos, bordure et pompon blancs, posé sur le sac du pictogramme */
.ambiance-noel .entete-logo::after{left:-9px;top:-15px;width:34px;height:30px;rotate:-16deg;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 34'%3E%3Cpath d='M6 26C9 12 18 4 30 6c3 .6 5 3 4 6-1 3-4 2-6 1-5-2-8 4-9 13z' fill='%23F49A24'/%3E%3Crect x='3' y='23' width='22' height='7' rx='3.5' fill='%23fff' stroke='%23102F59' stroke-opacity='.25'/%3E%3Ccircle cx='33' cy='11' r='4' fill='%23fff' stroke='%23102F59' stroke-opacity='.25'/%3E%3C/svg%3E")}
/* Nouvel an : étincelles turquoise et orange */
.ambiance-nouvel-an .entete-logo::after{left:-12px;top:-12px;width:30px;height:30px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath d='M10 2l1.8 5.2L17 9l-5.2 1.8L10 16l-1.8-5.2L3 9l5.2-1.8z' fill='%2300A99D'/%3E%3Cpath d='M22 14l1.2 3.3L26.5 18.5l-3.3 1.2L22 23l-1.2-3.3L17.5 18.5l3.3-1.2z' fill='%23F49A24'/%3E%3C/svg%3E");
  animation:ambiance-scintille 2.2s ease-in-out infinite}
@keyframes ambiance-scintille{50%{opacity:.35;scale:.85}}
/* Pâques : petit œuf turquoise rayé */
.ambiance-paques .entete-logo::after{left:-10px;top:-6px;width:20px;height:26px;rotate:-14deg;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 26'%3E%3Cpath d='M10 1c5 0 9 8 9 14s-4 10-9 10-9-4-9-10S5 1 10 1z' fill='%2300A99D'/%3E%3Cpath d='M2 13c3 2 5-2 8 0s5-2 8 0' stroke='%23fff' stroke-width='2' fill='none'/%3E%3Cpath d='M1.5 18c3 2 5-2 8.5 0s5-2 8.5 0' stroke='%23F49A24' stroke-width='2' fill='none'/%3E%3C/svg%3E")}

/* ---------- Effet animé ---------- */
.ambiance-canevas{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:60}
.ambiance-interrupteur{position:fixed;left:16px;bottom:16px;z-index:61;display:inline-flex;align-items:center;gap:8px;
  padding:9px 14px;border:0;border-radius:999px;cursor:pointer;font:600 13px/1.2 inherit;
  background:color-mix(in srgb,var(--amb-marine) 88%,transparent);color:var(--amb-blanc);backdrop-filter:blur(6px);
  box-shadow:0 10px 30px -12px color-mix(in srgb,var(--amb-marine) 60%,transparent);transition:opacity .3s,transform .3s}
.ambiance-interrupteur:hover{transform:translateY(-2px)}
.ambiance-interrupteur:focus-visible{outline:3px solid var(--amb-turquoise);outline-offset:3px}
.ambiance-interrupteur::before{content:"";width:14px;height:14px;background:var(--amb-orange);
  -webkit-mask:var(--amb-motif) center/contain no-repeat;mask:var(--amb-motif) center/contain no-repeat}

/* Noël : sapin et cadeau de part et d'autre du bandeau */
.ambiance-noel .ambiance-bandeau::before{background:var(--amb-turquoise);
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1l4 6h-2l4 6h-2.5l4.5 6H13v4h-2v-4H4l4.5-6H6l4-6H8z'/%3E%3C/svg%3E");
  mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1l4 6h-2l4 6h-2.5l4.5 6H13v4h-2v-4H4l4.5-6H6l4-6H8z'/%3E%3C/svg%3E")}
.ambiance-noel .ambiance-bandeau::after{background:var(--amb-orange);
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 10h18v4H3zM4 14h16v8H4z'/%3E%3Cpath d='M12 10c-2-5-7-5-6-2 .5 1.5 3 2 6 2zm0 0c2-5 7-5 6-2-.5 1.5-3 2-6 2z'/%3E%3C/svg%3E");
  mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 10h18v4H3zM4 14h16v8H4z'/%3E%3Cpath d='M12 10c-2-5-7-5-6-2 .5 1.5 3 2 6 2zm0 0c2-5 7-5 6-2-.5 1.5-3 2-6 2z'/%3E%3C/svg%3E")}

/* Noël : le traîneau du Père Noël traverse le haut de l'écran */
.ambiance-traineau{position:fixed;left:0;top:72px;z-index:61;width:250px;pointer-events:none;transform:translateX(-300px);will-change:transform}
.ambiance-traineau img{display:block;width:100%;height:auto;filter:drop-shadow(0 10px 14px rgba(16,47,89,.18))}
.ambiance-traineau.en-vol{animation:ambiance-vol 9s linear forwards}
.ambiance-traineau.en-vol img{animation:ambiance-houle 1.1s ease-in-out infinite alternate}
@keyframes ambiance-vol{0%{transform:translate(-300px,26px)}50%{transform:translate(calc(50vw - 125px),0)}100%{transform:translate(calc(100vw + 40px),-30px)}}
@keyframes ambiance-houle{from{transform:translateY(-4px) rotate(-1.5deg)}to{transform:translateY(4px) rotate(1.5deg)}}

@media (max-width:640px){
  .ambiance-traineau{width:160px;top:96px}
  .ambiance-traineau.en-vol{animation-duration:7s}
  .ambiance-bandeau__texte{padding:9px 44px;font-size:12.5px}
  .ambiance-bandeau::before,.ambiance-bandeau::after{width:20px;height:20px}
  .ambiance-interrupteur{left:10px;bottom:10px;padding:8px 12px;font-size:12px}
}
@media (prefers-reduced-motion:reduce){
  .ambiance-noel .entete::after,.ambiance-nouvel-an .entete::after,.ambiance-nouvel-an .entete-logo::after{animation:none}
}
@media print{.ambiance-bandeau,.ambiance-canevas,.ambiance-interrupteur,.ambiance-traineau{display:none}}
@media (prefers-reduced-motion:reduce){.ambiance-traineau{display:none}}
