@font-face {
    font-family: "Insaniburger";
    src: url("https://db.onlinewebfonts.com/t/4124a6204d35abaf22db32c19d62d73e.eot");
    src: url("https://db.onlinewebfonts.com/t/4124a6204d35abaf22db32c19d62d73e.eot?#iefix") format("embedded-opentype"),
         url("https://db.onlinewebfonts.com/t/4124a6204d35abaf22db32c19d62d73e.woff2") format("woff2"),
         url("https://db.onlinewebfonts.com/t/4124a6204d35abaf22db32c19d62d73e.woff") format("woff"),
         url("https://db.onlinewebfonts.com/t/4124a6204d35abaf22db32c19d62d73e.ttf") format("truetype"),
         url("https://db.onlinewebfonts.com/t/4124a6204d35abaf22db32c19d62d73e.svg#Insaniburger") format("svg");
    font-weight: normal;
    font-style: normal;
}

:root {
    --glass-bg: rgba(240, 161, 60, 0.20);
    --glass-bg-strong: rgba(240, 161, 60, 0.28);
    --accent-green: #06d6a0;
    --shadow-strong: rgba(0,0,0,0.25);
    --note-bg: rgba(0,0,0,0.6);
    --font-fallback: Arial, sans-serif;
}

/* Reset utile et box-sizing global */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Insaniburger', var(--font-fallback);
    background: linear-gradient(
        -45deg,
        rgba(255, 154, 158, 0.5),
        rgba(250, 208, 196, 0.5),
        rgba(251, 194, 235, 0.5),
        rgba(166, 193, 238, 0.5)
    );
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* léger voile flouté au-dessus du background animé */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: -2;
}

@keyframes gradientBG {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.container {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(8px) saturate(160%);
    -webkit-backdrop-filter: blur(8px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 25px var(--shadow-strong);
    padding: 40px;
    margin-left: 0;
    border-radius: 20px;
    text-align: center;
    width: 500px;
    max-width: 95%;
    z-index: 2;
    overflow: hidden;
}

.logo-center {
    width: 150px;
    height: 150px;
    margin: 0 auto 15px;
    display: block;
    object-fit: contain;
   
}

@keyframes floatLogo {
    0%   { transform: translateY(0) scale(1); }
    50%  { transform: translateY(-8px) scale(1.05); }
    100% { transform: translateY(0) scale(1); }
}
.extra-mention {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6); 
  margin-top: 5px;
  text-align: center;
}

.extra-mention a {
  color: #005d3a; 
  text-decoration: none;
  font-weight: bold;
}

.extra-mention a:hover {
  text-decoration: underline;
}

.big-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 690px;
    height: 690px;
    background-image: url('icon/faviconReclamo');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.1;
    z-index: 0;
}

#idleOverlay { display:flex; }
#idleOverlay[aria-hidden="true"] { display:none; }
#idleModal button { transition: transform .12s ease; }
#idleModal button:active { transform: translateY(1px) scale(.995); }
body.inactive-blur *:not(#idleOverlay):not(#idleOverlay *) { pointer-events: none; user-select: none; filter: blur(0.6px) saturate(.9); }
/* petites icônes flottantes */
.floating-icon {
    position: absolute;
    width: 40px;
    height: 40px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: 0;
    will-change: transform;
}

/* Titres / structure */
h2 {
    font-weight: 200;
    opacity: 0.9;
    text-align: center;
    margin-bottom: 10px;
    color: #000;
}
.form-row {
    margin-bottom: 20px;
    text-align: left;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
    color: #333;
}

/* Inputs global */
.input {
    width: 100%;
    padding: 13px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border 0.3s, box-shadow 0.2s;
    background: #fff;
    color: #111;
}

.input:focus,
.input:focus-visible {
    border: 2px solid var(--accent-green);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

/* Bouton primaire */
.button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #b57b3a, #ff7a18);
    background-size: 200% 200%;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    overflow: hidden;
    box-shadow:
        0 6px 14px rgba(0, 0, 0, 0.25),
        inset 0 -2px 4px rgba(0, 0, 0, 0.25);
    transition:
        transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.25s ease,
        background-position 0.6s ease;
}

.button::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg,
        transparent 30%,
        rgba(255,255,255,0.5),
        transparent 70%
    );
    transform: translateX(-120%);
    transition: transform 0.6s ease;
}

.button:hover {
    transform: translateY(-4px) scale(1.03);
    background-position: 100% 50%;
    box-shadow:
        0 14px 30px rgba(0, 0, 0, 0.35),
        0 0 25px rgba(255, 140, 0, 0.25);
}

.button:hover::before {
    transform: translateX(120%);
}

.button:active {
    transform: scale(0.99);
    box-shadow:
        0 4px 10px rgba(0,0,0,0.3),
        inset 0 3px 6px rgba(0,0,0,0.15);
}

/* Bouton retour / secondaire */
.return-button {
    margin-top: 18px;
    background: linear-gradient(135deg, #666666, #9a9a9a);
    background-size: 200% 200%;
    font-size: 0.95rem;
}

.return-button:hover {
    transform: translateY(-3px) scale(1.02);
    background-position: 100% 50%;
    box-shadow:
        0 10px 22px rgba(0,0,0,0.35),
        0 0 18px rgba(180,180,180,0.25);
}

/* petite mention */
.mention {
    margin-top: 15px;
    font-size: 0.8rem;
    color: #000;
    opacity: 0.9;
}

/* erreur */
.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

/* affichage date/time décoratif */
.date-time {
    position: fixed;
    bottom: 10px;
    right: 10px;
    font-size: 2.99rem;
    color: #333;
    opacity: 0.8;
    z-index: 2;
    font-family: 'Insaniburger', var(--font-fallback);
}

/* wrapper pour champ mot de passe + toggle */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-wrapper .input {
  padding-right: 44px; /* espace pour le bouton */
  width: 100%;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 0;
  color: inherit;
  border-radius: 6px;
}

.password-toggle:focus {
  outline: 2px solid rgba(0,123,255,0.6);
  outline-offset: 2px;
}

.password-toggle svg { width: 20px; height: 20px; }

/* animation pulse pour champs valides/invalides */
@keyframes pulseBorder {
    0% { border-color: orange; box-shadow: 0 0 10px orange; }
    50% { border-color: red; box-shadow: 0 0 20px red; }
    100% { border-color: orange; box-shadow: 0 0 10px orange; }
}

/* VIDEO / GIF en arrière-plan */
#bg-video,
#bg-gif {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: -2;
    transform: translateZ(0);
    will-change: transform;
}

.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.35);
    z-index: -1;
    pointer-events: none;
}

/* layout wrapper */
.layout-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    position: relative;
    z-index: 2;
}

/* note fixed (bulle d'info) */
.note-fixed,
.note-fixed2,
.note-fixed3 {
    position: fixed;
    right: 20px;
    background: var(--note-bg);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: var(--font-fallback);
    z-index: 99999;
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
    pointer-events: auto;
}

.note-fixed  { bottom: 70px; }
.note-fixed2 { bottom: 120px; }
.note-fixed3 { bottom: 20px; }

.note-fixed svg,
.note-fixed2 svg,
.note-fixed3 svg { vertical-align: middle; margin-right: 4px; }

.note-fixed a,
.note-fixed2 a,
.note-fixed3 a {
    color: #00f;
    text-decoration: underline;
}

.note-fixed a.btn-link {
    display: inline-block;
    padding: 4px 10px;
    margin-left: 10px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.note-fixed a.btn-link:hover {
    background: linear-gradient(135deg, #e67e22, #d35400);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.25);
}

/* Snowflake décoratif */
.snowflake {
    position: fixed;
    top: -10px;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 0 8px rgba(255,255,255,0.8);
    animation-name: snow;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform, opacity;
}
.snowflake {
  display: none !important;
}
@keyframes snow {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) translateX(30px) rotate(360deg);
        opacity: 0;
    }
}

/* Guirlandes / lights */
.christmas-lights-row {
    background: transparent;
    margin-bottom: -23px;
    z-index: 999999;
}

.lights-container {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 10px 0;
    background: transparent;
    z-index: 10;
}

/* ampoules - structure conservée mais pseudo éléments corrigés */
.christmas-light-red,
.christmas-light-green {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    padding: 0;
    display: block;
    position: relative;
    animation-fill-mode: both;
    animation-iteration-count: infinite;
    animation-direction: alternate;
    list-style: none;
    margin: 0;
}

.christmas-light-red::before,
.christmas-light-green::before {
    content: "";
    position: absolute;
    background: #222;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    top: -4.7px;
    left: 1px;
}

.christmas-light-red::after,
.christmas-light-green::after {
    content: "";
    top: -15px;
    left: 7px;
    position: absolute;
    width: 52px;
    height: 18.66667px;
    border-bottom: solid #222 2px;
    border-radius: 50%;
}

.christmas-light-red:last-child::after,
.christmas-light-green:last-child::after {
    content: none;
}

/* animations des ampoules */
@-webkit-keyframes flash-1 { 0%,100%{background:#f02241;box-shadow:0 4.6667px 24px 3px #f02241}50%{background:rgba(240,34,65,0.4);box-shadow:0 4.6667px 24px 3px rgba(240,34,65,0.2)} }
@keyframes flash-1      { 0%,100%{background:#f02241;box-shadow:0 4.6667px 24px 3px #f02241}50%{background:rgba(240,34,65,0.4);box-shadow:0 4.6667px 24px 3px rgba(240,34,65,0.2)} }
@-webkit-keyframes flash-2 { 0%,100%{background:#42b261;box-shadow:0 4.6667px 24px 3px #42b261}50%{background:rgba(66,178,97,0.4);box-shadow:0 4.6667px 24px 3px rgba(66,178,97,0.2)} }
@keyframes flash-2      { 0%,100%{background:#42b261;box-shadow:0 4.6667px 24px 3px #42b261}50%{background:rgba(66,178,97,0.4);box-shadow:0 4.6667px 24px 3px rgba(66,178,97,0.2)} }

.christmas-light-red { animation-name: flash-1, color-transition; animation-duration: 2s, 3s; }
.christmas-light-green { animation-name: flash-2, color-transition; animation-duration: 1.5s, 3s; }

@keyframes color-transition {
    0%,100% { filter: brightness(1.2); }
    50%    { filter: brightness(0.8); }
}

/* Compte à rebours décoratif */
.countdown-wrapper {
    position: absolute;
    top: calc(50% - 260px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
    color: #d62828;
    background: rgba(255,255,255,0.95);
    padding: 12px 20px;
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    font-family: 'Insaniburger', var(--font-fallback);
}

#countdown {
    display: inline-block;
    margin-left: 8px;
    color: #1f7a1f;
    font-size: 1.3rem;
    letter-spacing: 1px;
}

/* mobile-title initial state */
.mobile-title { display: none; }

/* ===== MEDIA QUERIES : consolidation et perfection mobile ===== */
@media screen and (max-width: 768px) {

    body {
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 20px 0;
        height: auto;
        overflow-y: auto;
        overflow-x: hidden;
        animation: none; /* économie mobile */
        background-size: cover;
        background-position: center;
    }

    .container {
        width: 92%;
        max-width: 480px;
        margin: 25px auto;
        padding: 22px;
        border-radius: 16px;
        background: var(--glass-bg-strong);
        backdrop-filter: blur(6px) saturate(140%);
        -webkit-backdrop-filter: blur(6px) saturate(140%);
        box-shadow: 0 6px 18px rgba(0,0,0,0.2);
    }

    .big-icon,
    .floating-icon {
        display: none !important;
    }

    .logo-center {
        width: 70px;
        height: 70px;
        margin-bottom: 12px;
    }

    h2 {
        font-size: 1.7rem;
        margin-bottom: 12px;
    }

    label {
        font-size: 0.95rem;
    }

    .form-row {
        display: flex;
        flex-direction: column;
        margin-bottom: 16px;
        text-align: left;
    }

    .input {
        width: 100%;
        padding: 12px;
        font-size: 1rem;
    }

    .button {
        width: 100%;
        padding: 12px;
        font-size: 1rem;
    }

    .date-time {
        position: static;
        margin-top: 15px;
        text-align: center;
        font-size: clamp(1.2rem, 4vw, 2rem);
        color: #ff6600;
        text-shadow: 0 2px 6px rgba(0,0,0,0.25);
    }

    .note-fixed,
    .note-fixed2,
    .note-fixed3 {
        right: 10px;
        font-size: 0.8rem;
        padding: 6px 10px;
    }

    .note-fixed  { bottom: 20px; }
    .note-fixed2 { bottom: 60px; }
    .note-fixed3 { bottom: 100px; }

    .countdown-wrapper {
        position: relative;
        top: 0;
        transform: none;
        margin: 10px auto 20px;
        font-size: 1rem;
        padding: 10px 16px;
    }

    #countdown {
        font-size: 1.1rem;
    }

    .lights-container {
        gap: 4px;
        padding: 6px 0;
    }

    .snowflake {
        display: none; /* désactivé mobile pour perf */
    }

    .mobile-title {
        color: #2ecc71;
        display: block !important;
        width: 100%;
        text-align: center;
        font-size: 1.5rem;
        font-weight: bold;
        margin-bottom: 15px;
    }
}

@media screen and (max-width: 420px) {

    .container {
        width: 94%;
        padding: 18px;
        border-radius: 14px;
    }

    h2 {
        font-size: 1.5rem;
    }

    .input {
        font-size: 0.95rem;
        padding: 10px;
    }

    .button {
        font-size: 0.95rem;
        padding: 10px;
    }

    .date-time {
        font-size: 1.3rem;
    }
}

/* Nettoyage final : forcer off les éléments décoratifs si besoin */
@media (pointer: coarse) {
    /* sur écrans tactiles, limiter animations lourdes */
    .big-icon,
    .floating-icon,
    .snowflake {
        display: none !important;
    }
}