/* ──────────────────────────────────────────────────────────────
   Bannière de consentement cookies — Intervalle
   Autonome : aucune dépendance externe, aucun service tiers.
   ────────────────────────────────────────────────────────────── */

.ic-consent,
.ic-consent * { box-sizing: border-box; }

.ic-consent {
   position: fixed;
   left: 0;
   right: 0;
   bottom: 0;
   z-index: 100000;
   display: none;
   padding: 20px 0;
   background: #00082F;
   border-top: 2px solid #CFA65C;
   box-shadow: 0 -8px 30px rgba(0, 0, 0, .35);
   font-family: 'IBM Plex Sans', 'Roboto', Arial, sans-serif;
   color: #fff;
   animation: ic-consent-up .35s ease-out;
}

.ic-consent.is-visible { display: block; }

@keyframes ic-consent-up {
   from { transform: translateY(100%); opacity: 0; }
   to   { transform: translateY(0);    opacity: 1; }
}

.ic-consent__inner {
   max-width: 1200px;
   margin: 0 auto;
   padding: 0 20px;
   display: flex;
   align-items: center;
   gap: 28px;
}

.ic-consent__text { flex: 1 1 auto; }

.ic-consent__title {
   margin: 0 0 6px;
   font-size: 16px;
   font-weight: 700;
   color: #CFA65C;
   line-height: 1.3;
}

.ic-consent__desc {
   margin: 0;
   font-size: 13.5px;
   line-height: 1.55;
   color: rgba(255, 255, 255, .85);
}

.ic-consent__desc a {
   color: #CFA65C;
   text-decoration: underline;
}

.ic-consent__actions {
   flex: 0 0 auto;
   display: flex;
   align-items: center;
   gap: 10px;
}

/* ── Boutons ──
   « Accepter » et « Refuser » ont volontairement la même taille et le même
   poids visuel : la CNIL impose que refuser soit aussi simple qu'accepter. */
.ic-btn {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   min-width: 140px;
   padding: 12px 22px;
   border: 2px solid #CFA65C;
   border-radius: 4px;
   font: 600 14px/1 'IBM Plex Sans', 'Roboto', Arial, sans-serif;
   text-align: center;
   cursor: pointer;
   transition: background-color .2s, color .2s, border-color .2s;
}

.ic-btn--accept {
   background: #CFA65C;
   color: #00082F;
}

.ic-btn--accept:hover { background: #e0bc79; border-color: #e0bc79; }

.ic-btn--reject {
   background: transparent;
   color: #CFA65C;
}

.ic-btn--reject:hover { background: rgba(207, 166, 92, .15); }

.ic-btn--link {
   min-width: 0;
   padding: 12px 8px;
   border: none;
   background: none;
   color: rgba(255, 255, 255, .7);
   text-decoration: underline;
   font-weight: 400;
}

.ic-btn--link:hover { color: #CFA65C; }

.ic-consent :focus-visible,
.ic-modal :focus-visible {
   outline: 2px solid #CFA65C;
   outline-offset: 2px;
}

/* ── Modale de personnalisation ── */
.ic-modal {
   position: fixed;
   inset: 0;
   z-index: 100001;
   display: none;
   align-items: center;
   justify-content: center;
   padding: 20px;
   background: rgba(0, 4, 20, .75);
   font-family: 'IBM Plex Sans', 'Roboto', Arial, sans-serif;
}

.ic-modal.is-visible { display: flex; }

.ic-modal__box {
   width: 100%;
   max-width: 620px;
   max-height: 88vh;
   display: flex;
   flex-direction: column;
   background: #00082F;
   border: 1px solid rgba(207, 166, 92, .4);
   border-radius: 6px;
   box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
   color: #fff;
}

.ic-modal__head {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 16px;
   padding: 22px 26px 16px;
   border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.ic-modal__title {
   margin: 0;
   font-size: 18px;
   font-weight: 700;
   color: #CFA65C;
}

.ic-modal__close {
   flex: 0 0 auto;
   width: 32px;
   height: 32px;
   padding: 0;
   border: none;
   border-radius: 4px;
   background: none;
   color: rgba(255, 255, 255, .7);
   font-size: 24px;
   line-height: 1;
   cursor: pointer;
}

.ic-modal__close:hover { color: #CFA65C; background: rgba(255, 255, 255, .06); }

.ic-modal__body {
   padding: 8px 26px 20px;
   overflow-y: auto;
}

.ic-cat {
   padding: 18px 0;
   border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.ic-cat:last-child { border-bottom: none; }

.ic-cat__head {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 16px;
}

.ic-cat__name {
   margin: 0;
   font-size: 15px;
   font-weight: 600;
}

.ic-cat__desc {
   margin: 8px 0 0;
   font-size: 13px;
   line-height: 1.55;
   color: rgba(255, 255, 255, .7);
}

.ic-cat__always {
   flex: 0 0 auto;
   font-size: 12px;
   font-weight: 600;
   color: #CFA65C;
   text-transform: uppercase;
   letter-spacing: .5px;
}

/* Interrupteur */
.ic-switch {
   flex: 0 0 auto;
   position: relative;
   display: inline-block;
   width: 46px;
   height: 26px;
}

.ic-switch input {
   position: absolute;
   opacity: 0;
   width: 100%;
   height: 100%;
   margin: 0;
   cursor: pointer;
}

.ic-switch__track {
   position: absolute;
   inset: 0;
   border-radius: 26px;
   background: rgba(255, 255, 255, .22);
   transition: background-color .2s;
   pointer-events: none;
}

.ic-switch__track::before {
   content: '';
   position: absolute;
   top: 3px;
   left: 3px;
   width: 20px;
   height: 20px;
   border-radius: 50%;
   background: #fff;
   transition: transform .2s;
}

.ic-switch input:checked + .ic-switch__track { background: #CFA65C; }
.ic-switch input:checked + .ic-switch__track::before { transform: translateX(20px); }
.ic-switch input:focus-visible + .ic-switch__track { outline: 2px solid #CFA65C; outline-offset: 2px; }

.ic-modal__foot {
   display: flex;
   flex-wrap: wrap;
   gap: 10px;
   justify-content: flex-end;
   padding: 18px 26px 22px;
   border-top: 1px solid rgba(255, 255, 255, .12);
}

/* ── Responsive ── */
@media (max-width: 900px) {
   .ic-consent__inner {
      flex-direction: column;
      align-items: stretch;
      gap: 16px;
   }

   .ic-consent__actions {
      flex-wrap: wrap;
      justify-content: center;
   }

   .ic-btn { flex: 1 1 auto; min-width: 130px; }
   .ic-btn--link { flex-basis: 100%; }
}

@media (max-width: 480px) {
   .ic-consent { padding: 16px 0; }
   .ic-consent__inner { padding: 0 16px; }
   .ic-consent__title { font-size: 15px; }
   .ic-consent__desc { font-size: 12.5px; }
   .ic-btn { padding: 11px 14px; font-size: 13.5px; }
   .ic-modal__head, .ic-modal__body, .ic-modal__foot { padding-left: 18px; padding-right: 18px; }
   .ic-modal__foot .ic-btn { width: 100%; }
}

/* Bloque le défilement de la page tant que le panneau de préférences est ouvert */
html.ic-modal-open,
html.ic-modal-open body { overflow: hidden; }
