/*
* Structure générale du style public et administration.
* Les variables CSS définissent l’identité visuelle globale.
* Les sections suivantes couvrent : base, composants, formulaires, modales, admin et responsive.
*/

*,
*::before,
*::after { box-sizing: border-box; }

@font-face {
  font-family: "ErasClic";
  src: url("fonts/eras.TTF") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root{
  --blue:#173f96;
  --green:#74bf2a;
  --dark:#0f172a;
  --text:#334155;
  --muted:#64748b;
  --bg:#ffffff;
  --soft:#f8fafc;
  --line:#e2e8f0;
  --shadow:0 18px 40px rgba(15,23,42,.08);
  --radius:22px;
  --container:1180px;
}

html{scroll-behavior:smooth;}
body{
  margin:0;
  font-family:"Inter",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--text);
  background:var(--bg);
  line-height:1.6;
}

img{max-width:100%;display:block;}
a{color:var(--blue);text-decoration:none;}
a:hover{text-decoration:underline;}

.logo-text-inline {
  display: inline;
  font-family: "ErasClic", "Inter", system-ui, sans-serif;
  font-size: inherit;
  line-height: inherit;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
  vertical-align: baseline;
}

.logo-text-inline .logo-text-blue {
  color: var(--blue);
}

.logo-text-inline .logo-text-green {
  color: var(--green);
}

p {
  text-align:justify;
}
.container{
  width:min(calc(100% - 2rem), var(--container));
  margin-inline:auto;
}

.site-header{
  position:sticky;
  top:0;
  z-index:20;
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(16px);
  border-bottom:1px solid rgba(226,232,240,.8);
}

.public-admin-preview-banner {
  border-bottom: 1px solid rgba(245, 158, 11, .28);
  background: rgba(245, 158, 11, .12);
  color: var(--dark);
  font-size: .92rem;
  font-weight: 750;
}

.public-admin-preview-banner .container {
  padding: .65rem 0;
}

.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:.9rem 0;
}

.brand img{
  height:110px;
  width:auto;
  border-radius:12px;
}

.nav-links{
  display:flex;
  gap:0;
  align-items:center;
  justify-content:center;
  white-space:nowrap;
}

.nav-links a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  padding:0 .9rem;
  color:var(--dark);
  font-weight:500;
}
.nav-links a + a{
  border-left:2px solid rgba(15,23,42,.78);
}
.nav-links a:hover{
  transform:scale(1.050);
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.5rem;
  min-height:48px;
  padding:.85rem 1.15rem;
  border-radius:999px;
  border:1px solid transparent;
  font-weight:700;
  transition:.2s ease;
  text-decoration:none;
  cursor:pointer;
}

.btn:hover{text-decoration:none; transform:translateY(-1px);}
.btn-primary{background:var(--blue); color:#fff;}
.btn-primary:hover{filter:brightness(1.05);}
.btn-secondary{background:#fff; color:var(--blue); border-color:var(--line);}
.btn-thirtary{
  background: rgba(220, 38, 38, .10);
  color: #b91c1c;
  border-color: #f0e2e2;
}
.btn-quaternary{
  background: rgba(37, 219, 79, 0.1);
  color: #31b91c;
  border-color: #e2f0e2;
}
.btn-nav{background:#fff; color:var(--blue); border-color:var(--line);}

.hero{
  padding:5rem 0 3rem;
  background:
  radial-gradient(circle at top right, rgba(116,191,42,.12), transparent 28%),
  radial-gradient(circle at left top, rgba(23,63,150,.10), transparent 30%);
}

.hero-grid{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:2rem;
  align-items: flex-start;
}

.eyebrow{
  margin:0 0 .5rem;
  color:var(--green);
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  font-size:.85rem;
}

h1,h2,h3{
  color:var(--dark);
  line-height:1.1;
  margin:0;
}

h1{font-size:clamp(2rem, 4vw, 4rem); letter-spacing:-.03em;}
h2{font-size:clamp(1.35rem, 3vw, 2rem); letter-spacing:-.03em;}
h3{font-size:1.2rem;}

.hero-title-logo {
  font-family:"ErasClic", "Inter", system-ui, sans-serif;
  letter-spacing:0;
}

.hero-title-logo span {
  color:var(--green);
  text-decoration:underline;
  text-decoration-thickness:.08em;
  text-underline-offset:.12em;
}

.lead{
  font-size:1.1rem;
  max-width:62ch;
  margin:1.2rem 0 0;
}

.hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:.85rem;
  margin:1.6rem 0;
}

.hero-points{
  display:flex;
  flex-wrap:wrap;
  gap:1rem;
  padding:0;
  margin:0;
  list-style:none;
  color:var(--muted);
  font-weight:600;
}

.hero-card .card,
.contact-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:1.5rem;
}

.quick-info{
  display:grid;
  gap:.85rem;
  margin:1.2rem 0 0;
}

.quick-info div{
  display:flex;
  justify-content:space-between;
  gap:1rem;
  padding-bottom:.7rem;
  border-bottom:1px solid var(--line);
}

.quick-info dt{font-weight:600; color:var(--dark);}
.quick-info dd{margin:0; color:var(--text); text-align:right;}

.small-note{font-size:.94rem; color:var(--muted);}

/* =========================================================
Avis clients - Carousel hero
========================================================= */

.hero-testimonials {
  width:100%;
}

.testimonials-card {
  position:relative;
  overflow:hidden;
}

.testimonials-card::before {
  content:"";
  position:absolute;
  top:-80px;
  right:-80px;
  z-index:0;
  width:180px;
  height:180px;
  background:radial-gradient(circle, rgba(116,191,42,.16), transparent 70%);
  pointer-events:none;
}

.testimonials-card > * {
  position:relative;
  z-index:1;
}

.testimonials-header {
  margin-bottom:1.35rem;
}

.testimonials-header .eyebrow {
  margin:0 0 .35rem;
  color:var(--green);
  font-size:.78rem;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.testimonials-header h2 {
  margin:0;
}

.testimonials-carousel {
  position:relative;
}

.testimonials-track {
  position:relative;
  min-height:245px;
}

.testimonial-slide {
  display:none;
  animation:testimonialFade .35s ease;
}

.testimonial-slide.is-active {
  display:block;
}

.testimonial-stars {
  margin-bottom:1rem;
  color:var(--green);
  font-size:1rem;
  letter-spacing:.08em;
}

.testimonial-slide blockquote {
  margin:0;
  color:var(--dark);
  font-size:clamp(1.05rem, 1.8vw, 1.35rem);
  font-weight:700;
  line-height:1.45;
}

.testimonial-slide footer {
  display:flex;
  flex-direction:column;
  gap:.2rem;
  margin-top:1.25rem;
}

.testimonial-slide footer strong {
  color:var(--dark);
  font-size:.98rem;
}

.testimonial-slide footer span {
  color:var(--muted);
  font-size:.9rem;
  line-height:1.4;
}

.testimonials-controls {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  margin-top:1.4rem;
}

.testimonial-control {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:42px;
  height:42px;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--bg);
  color:var(--blue);
  font-size:1.8rem;
  font-weight:600;
  line-height:1;
  cursor:pointer;
  transition:transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.testimonial-control:hover {
  transform:translateY(-1px);
  border-color:rgba(23,63,150,.25);
  box-shadow:0 10px 24px rgba(15,23,42,.08);
}

.testimonial-control:focus-visible,
.testimonial-dots button:focus-visible {
  outline:3px solid rgba(116,191,42,.28);
  outline-offset:3px;
}

.testimonial-dots {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.5rem;
  flex:1;
}

.testimonial-dots button {
  width:8px;
  height:8px;
  padding:0;
  border:0;
  border-radius:999px;
  background:var(--line);
  cursor:pointer;
  transition:width .2s ease, background .2s ease;
}

.testimonial-dots button.is-active {
  width:24px;
  background:var(--green);
}

.testimonial-contact {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  margin-top:1.35rem;
  padding-top:1.15rem;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:.92rem;
}

.testimonial-contact a {
  color:var(--blue);
  font-weight:800;
  text-decoration:none;
}

.testimonial-contact a:hover {
  text-decoration:underline;
}

@keyframes testimonialFade {
  from {
    opacity:0;
    transform:translateY(8px);
  }
  
  to {
    opacity:1;
    transform:translateY(0);
  }
}

.trust{
  padding:0 0 2rem;
}

.trust-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:1rem;
}

.trust-item{
  border:1px solid var(--line);
  border-radius:18px;
  padding:1rem 1.2rem;
  background:#fff;
}
.trust-item strong{display:block; color:var(--dark); margin-bottom:.25rem;}

.section{padding:5rem 0;}
.section.alt{background:var(--soft);}
.section-head{
  max-width:760px;
  margin-bottom:2rem;
}
.section-head p:last-child{margin-top:.9rem;}

.cards-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(260px,1fr));
  justify-content:center;
  gap: 3rem 1.5rem;
  align-items:stretch;
}
.service-card, .price-card, .step{
  background:#fff;
  border:1px solid var(--line);
  border-radius:20px;
  padding:1.3rem;
  padding-top:2rem;
  box-shadow:0 10px 25px rgba(15,23,42,.04);
}
.price-card-pack{
  border-left:4px solid var(--green);
}

.tariff-list,
.tariff-text{
  margin-bottom:1rem;
}

.price-card{
  display:flex;
  flex-direction:column;
  height:100%;
}

.tariff-title{
  display:flex;
  align-items:baseline;
  flex-wrap:wrap;
  column-gap:.32em;
  row-gap:.12em;
}

.tariff-title-main{
  font:inherit;
  color:inherit;
}

.tariff-title-detail{
  color:var(--blue);
  font-size:.72em;
  font-weight:500;
  line-height:1.2;
}

.price-card-cta{
  margin-top:auto;           /* pousse en bas */
  display:flex;
  justify-content:center;    /* centre horizontal */
  padding-top:1rem;
  
}
.price-card-cta-btn {
  background-color: var(--green);
  font-weight: 800;
  width:100%;
  max-width:220px;
}

.price-card-featured{
  border:2px solid var(--blue);
  box-shadow:0 20px 45px rgba(23,63,150,.12);
  transform:scale(1.03);
  z-index:2;
}

.price-card-badge{
  position:absolute;
  overflow:visible;
  top:-15px;
  right:-30px;
  transform:translateX(-50%);
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--blue);
  color:#fff;
  font-size:.8rem;
  font-weight:700;
  padding:.45rem .85rem;
  border-radius:999px;
  box-shadow:0 10px 20px rgba(23,63,150,.12);
  height:37px; /* clé importante */
}

.price-card-featured:hover{
  transform:scale(1.049);
  box-shadow:0 10px 20px rgba(23,63,150,.3);
}

@media (max-width: 768px){
  .price-card-badge{top:-15px;right:-30px;transform:translateX(-50%);}
  .price-card-featured:hover{
    transform:scale(0.995);
    box-shadow:0 10px 20px rgba(23,63,150,.3);
  }
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 280px));
  gap: 2rem;
  justify-content: center;
}

.price{
  color:var(--blue);
  font-size:1.8rem;
  font-weight:800;
  margin:.7rem 0;
}
.pricing-note{margin-top:1rem; color:var(--muted);}
.pricing-note span {
  font-style: italic;
}

.support-section{
  background:
    radial-gradient(circle at right top, rgba(116,191,42,.10), transparent 30%),
    #fff;
}

.support-section p{
  text-align:left;
}

.support-download-panel{
  display:grid;
  grid-template-columns:minmax(0,.85fr) minmax(0,1.6fr);
  gap:1.5rem;
  align-items:start;
  padding:1.5rem;
  border:1px solid var(--line);
  border-radius:22px;
  background:#fff;
  box-shadow:0 14px 34px rgba(15,23,42,.06);
}

.support-download-copy h3{
  margin-bottom:.65rem;
}

.support-download-copy p{
  margin:0;
  color:var(--muted);
}

.support-download-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:.8rem;
}

.support-download-card{
  display:flex;
  align-items:center;
  gap:.8rem;
  min-height:78px;
  padding:.85rem;
  border:1px solid rgba(23,63,150,.14);
  border-radius:18px;
  background:#fff;
  color:var(--dark);
  text-decoration:none;
  transition:border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.support-download-card:hover,
.support-download-card:focus-visible{
  border-color:rgba(23,63,150,.32);
  box-shadow:0 12px 26px rgba(15,23,42,.08);
  text-decoration:none;
  transform:translateY(-1px);
}

.support-download-card strong,
.support-download-card small{
  display:block;
}

.support-download-card strong{
  font-size:1rem;
  color:var(--dark);
}

.support-download-card small{
  color:var(--muted);
  font-weight:700;
}

.support-platform-mark{
  flex:0 0 46px;
  width:46px;
  height:46px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  background:rgba(23,63,150,.08);
  color:var(--blue);
}

.support-platform-mark svg{
  width:26px;
  height:26px;
  display:block;
  fill:currentColor;
}

.support-carousel-shell{
  width:80%;
  max-width:960px;
  margin:2rem auto 0;
}

.support-carousel-frame{
  position:relative;
  display:grid;
  aspect-ratio:4 / 3;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:24px;
  background:#fff;
  box-shadow:0 16px 36px rgba(15,23,42,.08);
}

.support-slide{
  display:none;
  grid-area:1 / 1;
  width:100%;
  height:100%;
  min-width:0;
  min-height:0;
  box-sizing:border-box;
  overflow:hidden;
  margin:0;
  padding:1rem;
  text-align:center;
}

.support-slide.is-active{
  display:flex;
  align-items:center;
  justify-content:center;
}

.support-slide img{
  width:100%;
  height:100%;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  display:block;
  margin:0 auto;
  border-radius:16px;
}

.support-carousel-controls{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.8rem;
  margin-top:1rem;
}

.support-carousel-control,
.support-carousel-dots button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--line);
  background:#fff;
  color:var(--blue);
  cursor:pointer;
}

.support-carousel-control{
  width:44px;
  height:44px;
  border-radius:999px;
  font-size:1.7rem;
  font-weight:700;
}

.support-carousel-dots{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.45rem;
}

.support-carousel-dots button{
  width:11px;
  height:11px;
  padding:0;
  border-radius:999px;
}

.support-carousel-dots button.is-active{
  background:var(--green);
  border-color:var(--green);
}

.steps{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:1rem;
}
.step span{
  display:inline-flex;
  width:40px;
  height:40px;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:rgba(23,63,150,.08);
  color:var(--blue);
  font-weight:800;
  margin-bottom:.8rem;
}

.form-wrap{
  max-width:900px;
  margin:0 auto;
}
.form-head{margin-bottom:1.4rem;}
.form-note{
  padding:.85rem 1rem;
  border-left:4px solid var(--green);
  background:#fff;
  border-radius:10px;
}

.contact-form{
  background:#fff;
  border:1px solid var(--line);
  border-radius:24px;
  box-shadow:var(--shadow);
  padding:1.4rem;
}
.grid-2{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:1rem;
}
label{
  display:grid;
  gap:.45rem;
  margin-bottom:1rem;
}
label span{
  font-weight:600;
  color:var(--dark);
}
label span span {
  font-weight:300;
  color:var(--blue);
}
input, select, textarea{
  width:100%;
  border:1px solid var(--line);
  border-radius:14px;
  padding:.95rem 1rem;
  font:inherit;
  color:var(--dark);
  background:#fff;
}
input:focus, select:focus, textarea:focus{
  outline:none;
  border-color:rgba(23,63,150,.55);
  box-shadow:0 0 0 4px rgba(23,63,150,.08);
}

#manualRequestForm label,
#manualRequestForm input,
#manualRequestForm select,
#manualRequestForm textarea {
  min-width: 0;
  max-width: 100%;
}

#manualRequestForm input[type="datetime-local"] {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  inline-size: 100%;
  max-inline-size: 100%;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  text-align: left;
}

.checkbox{
  display:flex;
  align-items:flex-start;
  gap:.8rem;
}
.checkbox input{
  width:18px;
  height:18px;
  margin-top:.25rem;
}

.checkbox.is-disabled-choice {
  opacity: .58;
}

.checkbox.is-disabled-choice span {
  color: var(--muted);
}

.form-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:1rem;
  margin-top:.5rem;
}

.contact-block{
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:1.5rem;
  align-items:start;
}

.site-footer{
  border-top:1px solid var(--line);
  padding:1.2rem 0 2rem;
}
.footer-grid{
 display:flex;
  flex-direction:column;
  align-items:center;
  gap:1rem;
  text-align:center;
}

@media (max-width: 1120px){
  .nav{flex-wrap:wrap;}
  .brand{
    display:flex;
    justify-content:center;
    width:100%;
  }
  .nav-links{
    order:3;
    width:100%;
    justify-content:center;
    flex-wrap:nowrap;
    overflow-x:auto;
    overflow-y:hidden;
    padding:.15rem 1.25rem .45rem;
    scroll-snap-type:x proximity;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    mask-image:linear-gradient(90deg, transparent 0, #000 1.2rem, #000 calc(100% - 1.2rem), transparent 100%);
    -webkit-mask-image:linear-gradient(90deg, transparent 0, #000 1.2rem, #000 calc(100% - 1.2rem), transparent 100%);
  }
  .nav-links::-webkit-scrollbar{
    display:none;
  }
  .nav-links a{
    scroll-snap-align:center;
  }
  .cards-grid{grid-template-columns:repeat(2,1fr);}
  .pricing-grid{grid-template-columns:repeat(2,1fr);}
  .steps{grid-template-columns:repeat(2,1fr);}
  .support-download-panel{grid-template-columns:1fr;}
}

@media (max-width: 860px){
  .btn-nav{display:none;}
  .hero-grid,
  .contact-block,
  .trust-grid{grid-template-columns:1fr;}
  .grid-2{grid-template-columns:1fr;}
}

@media (max-width: 640px){
  .hero{padding:4rem 0 2rem;}
  .section{padding:4rem 0;}
  .cards-grid,
  .pricing-grid,
  .steps{grid-template-columns:1fr;}
  .support-download-grid{grid-template-columns:1fr;}
  .support-carousel-shell{width:100%;}
  .brand img{height:99px;}
  .nav{
    gap:.65rem;
    padding:.75rem 0 .45rem;
  }
  .nav-links{
    font-size:clamp(.76rem, 3.1vw, .9rem);
    padding-bottom:.3rem;
  }
  .nav-links a{
    padding:0 clamp(.24rem, 1.2vw, .44rem);
  }
  .nav-links a + a{
    border-left-width:1.5px;
  }
  #manualRequestForm input[type="datetime-local"] {
    font-size: .95rem;
    padding-inline: .75rem;
    line-height: 1.35;
    min-inline-size: 0;
  }
  #manualRequestForm input[type="datetime-local"]::-webkit-date-and-time-value {
    text-align: left;
    min-height: 1.35em;
  }
/*.nav-links{display:none;}*/
}

.service-icon,
.step-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:.9rem;
}
.service-icon svg,
.step-icon svg{
  width:80px;
  height:80px;
  transition:transform .2s ease;
}
.service-card:hover .service-icon svg,
.step:hover .step-icon svg{
  transform:translateY(-2px) scale(1.04);
}
.step{
  position:relative;
}
.step > span{
  position:absolute;
  top:1rem;
  right:1rem;
}
.step-icon{
  justify-content:flex-start;
}
.modal-overlay{
  position:fixed;
  inset:0;
  z-index:120;
  display:none;
}
.modal-overlay.is-open{display:block;}
.modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.58);
  backdrop-filter:blur(4px);
}
.modal-panel{
  position:relative;
  width:min(calc(100% - 1.5rem), 980px);
  max-height:min(88vh, 920px);
  margin:4vh auto;
  background:#fff;
  border:1px solid var(--line);
  border-radius:28px;
  box-shadow:0 30px 70px rgba(15,23,42,.22);
  overflow:hidden;
}
.modal-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
  padding:1.25rem 1.25rem 1rem;
  border-bottom:1px solid var(--line);
  background:#fff;
  position:sticky;
  top:0;
  z-index:2;
}
.modal-header-actions{
  display:flex;
  align-items:center;
  gap:.75rem;
  flex:0 0 auto;
}

.request-modal-panel .modal-header {
  display: block;
  padding-right: 1.25rem;
}

.request-modal-panel .modal-header > div:first-child,
.request-modal-title-block {
  min-width: 0;
}

#requestModalTitle {
  overflow-wrap: anywhere;
  line-height: 1.08;
  max-width: calc(100% - 5rem);
}

.request-modal-status-slot {
  width: max-content;
  max-width: 100%;
  margin-top: .65rem;
  white-space: nowrap;
}

.request-modal-status-slot[hidden] {
  display: none !important;
}

.request-modal-title-block {
  width: 100%;
  padding-right: 0;
}

.request-modal-status-action-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .75rem;
  margin-top: .65rem;
  width: 100%;
  min-width: 0;
}

.request-modal-status-action-row .request-modal-status-slot {
  flex: 0 1 auto;
  width: fit-content;
  min-width: 0;
  max-width: calc(100% - 10rem);
  margin-top: 0;
  align-self: center;
  overflow: hidden;
  text-overflow: ellipsis;
}

.request-modal-primary-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  margin-left: auto;
}

.request-modal-panel .modal-close {
  position: absolute;
  top: 1.05rem;
  right: 1.25rem;
}

.request-modal-panel.is-client-account-modal .request-modal-title-block {
  padding-right: 6.8rem;
}

.request-modal-panel.is-client-account-modal #requestModalTitle {
  max-width: 100%;
}

.request-modal-panel.is-client-account-modal .request-modal-status-action-row {
  display: block;
  min-height: 0;
  margin-top: 0;
}

.request-modal-panel.is-client-account-modal .request-modal-primary-actions {
  position: absolute;
  top: 1.05rem;
  right: calc(1.25rem + 44px + .75rem);
  z-index: 3;
}

.request-modal-panel.is-client-account-modal .modal-signature-btn,
.request-modal-panel.is-client-account-modal .modal-send-btn {
  display: none !important;
}

.legal-modal-download{
  min-height:44px;
  padding:.65rem 1rem;
  white-space:nowrap;
}

.legal-modal-panel .modal-header {
  align-items: flex-start;
}

.legal-modal-title-block {
  min-width: 0;
}

.legal-modal-title-block .eyebrow {
  margin-bottom: .35rem;
}

.legal-modal-actions {
  flex: 0 0 auto;
}

.legal-modal-panel .legal-modal-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.modal-close{
  width:44px;
  height:44px;
  border:none;
  border-radius:999px;
  background:var(--soft);
  color:var(--dark);
  font-size:1.6rem;
  line-height:1;
  cursor:pointer;
}
.modal-save-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  padding:0;
  border:none;
  border-radius:999px;
  background:var(--green);
  color:#fff;
  box-shadow:0 12px 24px rgba(116,191,42,.24);
  cursor:pointer;
  transition:transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.modal-save-btn:hover,
.modal-save-btn:focus-visible{
  background:#62a824;
  box-shadow:0 14px 28px rgba(116,191,42,.32);
  outline:none;
  transform:translateY(-1px);
}
.modal-save-btn[hidden]{display:none;}
.modal-save-btn svg{
  width:1.15rem;
  height:1.15rem;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.modal-send-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  padding:0;
  border:none;
  border-radius:999px;
  background:#ef6b6b;
  color:#fff;
  box-shadow:0 12px 24px rgba(239,107,107,.25);
  cursor:pointer;
  transition:transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.modal-send-btn:hover,
.modal-send-btn:focus-visible{
  background:#d95353;
  box-shadow:0 14px 28px rgba(239,107,107,.34);
  outline:none;
  transform:translateY(-1px);
}
.modal-send-btn[hidden]{display:none;}
.modal-send-btn svg{
  width:1.15rem;
  height:1.15rem;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.modal-signature-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  padding:0;
  border:none;
  border-radius:999px;
  background:#38bdf8;
  color:#fff;
  box-shadow:0 12px 24px rgba(56,189,248,.26);
  cursor:pointer;
  transition:transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.modal-signature-btn:hover,
.modal-signature-btn:focus-visible{
  background:#0ea5e9;
  box-shadow:0 14px 28px rgba(14,165,233,.34);
  outline:none;
  transform:translateY(-1px);
}
.modal-signature-btn[hidden]{display:none;}
.modal-signature-btn svg{
  width:1.25rem;
  height:1.25rem;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.modal-save-btn,
.modal-send-btn,
.modal-signature-btn,
.contract-create-submit,
.client-section-create-submit,
.contract-usage-download {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  width:44px;
  height:44px;
  min-width:44px;
  min-height:44px;
  padding:0;
  border-radius:999px;
  line-height:1;
  text-decoration:none;
}

.modal-save-btn svg,
.modal-send-btn svg,
.contract-create-submit svg,
.client-section-create-submit svg,
.contract-usage-download svg {
  width:1.15rem;
  height:1.15rem;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.modal-signature-btn svg {
  width:1.25rem;
  height:1.25rem;
}

.icon-action-btn {
  appearance:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  width:44px;
  height:44px;
  min-width:44px;
  min-height:44px;
  padding:0;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  color:var(--blue);
  box-shadow:0 12px 24px rgba(15,23,42,.08);
  line-height:1;
  text-decoration:none;
  cursor:pointer;
  transition:transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}

.icon-action-btn:hover,
.icon-action-btn:focus-visible {
  outline:none;
  transform:translateY(-1px);
  border-color:rgba(23,63,150,.28);
  background:rgba(23,63,150,.06);
  box-shadow:0 14px 28px rgba(15,23,42,.11);
}

.icon-action-btn svg {
  width:1.15rem;
  height:1.15rem;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.icon-action-btn--primary {
  border-color:var(--blue);
  background:var(--blue);
  color:#fff;
  box-shadow:0 12px 24px rgba(23,63,150,.2);
}

.icon-action-btn--primary:hover,
.icon-action-btn--primary:focus-visible {
  border-color:var(--blue);
  background:#14357f;
  box-shadow:0 14px 28px rgba(23,63,150,.28);
}

.icon-action-btn--success {
  border-color:rgba(116,191,42,.22);
  background:var(--green);
  color:#fff;
  box-shadow:0 12px 24px rgba(116,191,42,.24);
}

.icon-action-btn--success:hover,
.icon-action-btn--success:focus-visible {
  border-color:rgba(116,191,42,.32);
  background:#62a824;
  box-shadow:0 14px 28px rgba(116,191,42,.32);
}

.icon-action-btn--danger {
  border-color:rgba(239,107,107,.28);
  background:#ef6b6b;
  color:#fff;
  box-shadow:0 12px 24px rgba(239,107,107,.25);
}

.icon-action-btn--danger:hover,
.icon-action-btn--danger:focus-visible {
  border-color:rgba(217,83,83,.36);
  background:#d95353;
  box-shadow:0 14px 28px rgba(239,107,107,.34);
}

.icon-action-btn--warning {
  border-color:rgba(245,158,11,.28);
  background:#f59e0b;
  color:#fff;
  box-shadow:0 12px 24px rgba(245,158,11,.22);
}

.icon-action-btn--warning:hover,
.icon-action-btn--warning:focus-visible {
  border-color:rgba(217,119,6,.34);
  background:#d97706;
  box-shadow:0 14px 28px rgba(245,158,11,.3);
}

form[aria-busy="true"] [type="submit"],
form.is-ajax-submitting [type="submit"] {
  cursor:wait;
  opacity:.72;
}

form[aria-busy="true"] {
  transition:opacity .2s ease;
}
.modal-panel {
  padding-top: 0;
}
.modal-header,
.modal-body {
  position: relative;
}
.modal-close:hover{background:#eef2f7;}
.modal-body{
  padding:1.25rem;
  overflow:auto;
  max-height:calc(88vh - 92px);
}
.modal-content{
  box-shadow:none;
  border-radius:20px;
}
body.modal-open{overflow:hidden;}

.application-log-panel{
  width:min(calc(100% - 2rem), 1240px);
  height:min(82vh, 820px);
  max-height:calc(100vh - 3rem);
  margin:3vh auto;
  display:flex;
  flex-direction:column;
}
.application-log-header{
  align-items:center;
}
.application-log-header h2{
  margin:.15rem 0 0;
}
.application-log-subtitle{
  margin:.35rem 0 0;
  color:var(--muted);
}
.application-log-header-actions{
  align-items:center;
}
.application-log-limit{
  margin:0;
}
.application-log-limit select{
  min-width:190px;
  min-height:44px;
  padding:.65rem 2.35rem .65rem .85rem;
}
.application-log-refresh{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  color:var(--dark);
  cursor:pointer;
}
.application-log-refresh:hover,
.application-log-refresh:focus-visible{
  background:var(--soft);
  outline:none;
}
.application-log-refresh:disabled{
  cursor:wait;
  opacity:.7;
}
.application-log-refresh svg{
  width:20px;
  height:20px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.application-log-refresh.is-loading svg{
  animation:application-log-spin .8s linear infinite;
}
.application-log-body{
  display:flex;
  flex:1 1 auto;
  min-height:0;
  flex-direction:column;
  gap:.85rem;
  max-height:none;
  overflow:hidden;
}
.application-log-code{
  flex:1 1 auto;
  min-height:260px;
  overflow:auto;
  padding:.85rem 0;
  border:1px solid #17243a;
  border-radius:18px;
  background:#0b1220;
  color:#dbe7f5;
  font:500 .82rem/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  tab-size:2;
}
.application-log-line{
  display:grid;
  grid-template-columns:4.2rem 10.8rem 5.5rem minmax(0, 1fr);
  gap:.75rem;
  min-width:max-content;
  padding:.08rem 1rem .08rem 0;
  white-space:pre;
}
.application-log-line:hover{
  background:rgba(148,163,184,.08);
}
.application-log-number{
  padding-right:.85rem;
  border-right:1px solid rgba(148,163,184,.16);
  color:#52647d;
  text-align:right;
  user-select:none;
}
.application-log-timestamp{
  color:#8ea5c0;
}
.application-log-level{
  font-weight:800;
}
.application-log-level.is-info{
  color:#70d98b;
}
.application-log-level.is-warning{
  color:#f5bf67;
}
.application-log-level.is-error{
  color:#ff7d7d;
}
.application-log-level.is-default{
  color:#b9c7da;
}
.application-log-message{
  color:#dbe7f5;
}
.application-log-raw{
  grid-column:2 / -1;
}
.application-log-placeholder{
  margin:0;
  padding:1rem 1.25rem;
  color:#9fb0c6;
  font:500 .9rem/1.5 Inter, sans-serif;
}
.application-log-placeholder.is-error{
  color:#ff9b9b;
}
.application-log-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  color:var(--muted);
  font-size:.84rem;
}
.application-log-meta{
  display:flex;
  flex-wrap:wrap;
  gap:.4rem 1.1rem;
}
.application-log-follow{
  display:flex;
  align-items:center;
  flex:0 0 auto;
  gap:.55rem;
  margin:0;
  color:var(--dark);
  font-weight:700;
  cursor:pointer;
}
.application-log-follow input{
  width:18px;
  height:18px;
  margin:0;
  accent-color:var(--green);
}

@keyframes application-log-spin{
  to{transform:rotate(360deg);}
}

@media (max-width: 640px){
  .service-icon svg,
  .step-icon svg{
    width:72px;
    height:72px;
  }
  .modal-panel{
    width:min(calc(100% - .75rem), 980px);
    margin:1.5vh auto;
    max-height:97vh;
    border-radius:22px;
  }
  .modal-body{
    max-height:calc(97vh - 86px);
    padding:.9rem;
  }
  .modal-header{
    padding:1rem .9rem .85rem;
    flex-wrap:wrap;
  }
  .modal-header-actions{
    width:100%;
    justify-content:space-between;
  }
  .legal-modal-panel .modal-header {
    display: grid;
    grid-template-columns: 1fr;
    gap: .95rem;
    padding: 1.05rem .9rem .95rem;
  }
  .legal-modal-panel .modal-header-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    width: 100%;
    gap: .65rem;
    align-items: center;
  }
  .legal-modal-panel .legal-modal-download {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: .7rem 1rem;
    white-space: normal;
  }
  .legal-modal-panel .modal-close {
    position: static;
    width: 44px;
    height: 44px;
  }
  .legal-modal-panel .legal-modal-body {
    max-height: calc(97vh - 156px);
  }
  .request-modal-panel .modal-header{
    display: block;
    padding: 1rem .95rem .9rem;
  }
  .request-modal-panel .modal-header > div:first-child {
    width: 100%;
    padding-right: 0;
  }
  .request-modal-panel .modal-header .eyebrow {
    margin-bottom: .25rem;
    line-height: 1.2;
  }
  .request-modal-panel #requestModalTitle {
    font-size: clamp(1.28rem, 7vw, 1.65rem);
    max-width: calc(100% - 3.6rem);
  }
  .request-modal-panel .modal-header-actions{
    position:static;
    width:auto;
    margin-left:auto;
    justify-content:flex-end;
    gap:.55rem;
  }
  .request-modal-panel .request-modal-status-action-row {
    gap: .55rem;
  }
  .request-modal-panel .request-modal-status-slot {
    max-width: calc(100% - 9.2rem);
    margin-top: 0;
  }
  .request-modal-panel .modal-signature-btn,
  .request-modal-panel .modal-send-btn,
  .request-modal-panel .modal-save-btn {
    width:40px;
    height:40px;
  }
  .request-modal-panel .modal-close {
    position:absolute;
    top:.95rem;
    right:.95rem;
    width:40px;
    height:40px;
  }
  .request-modal-panel.is-client-account-modal .request-modal-title-block {
    padding-right: 6rem;
  }
  .request-modal-panel.is-client-account-modal .request-modal-primary-actions {
    top: .95rem;
    right: calc(.95rem + 40px + .55rem);
  }
  .legal-modal-download{
    flex:1 1 auto;
  }
  .application-log-panel{
    width:min(calc(100% - .75rem), 1240px);
    height:97vh;
    margin:1.5vh auto;
  }
  .application-log-header{
    align-items:flex-start;
  }
  .application-log-header-actions{
    width:100%;
  }
  .application-log-limit{
    flex:1 1 auto;
  }
  .application-log-limit select{
    width:100%;
    min-width:0;
  }
  .application-log-footer{
    align-items:flex-start;
    flex-direction:column;
  }
}

.footer-links {
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  width:100%;
  gap: .8rem .5rem;
  align-items:center;
  text-align:center;
}

.footer-links a, .footer-links span {
  font-size: small;
}

.footer-made-by {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.55rem;
  max-width:100%;
  padding:.58rem .9rem;
  border:1px solid rgba(23,63,150,.12);
  border-radius:999px;
  background:linear-gradient(135deg, rgba(23,63,150,.06), rgba(116,191,42,.10));
  color:var(--dark);
  font-size:.9rem;
  font-weight:500;
  line-height:1.25;
  box-shadow:0 10px 24px rgba(15,23,42,.04);
}

.footer-made-by-icon {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  width:2rem;
  height:2rem;
  border-radius:50%;
  background:#fff;
  color:var(--blue);
  box-shadow:0 6px 16px rgba(23,63,150,.10);
}

.footer-made-by-icon svg {
  width:1.05rem;
  height:1.05rem;
  fill:none;
  stroke:currentColor;
  stroke-linecap:round;
  stroke-linejoin:round;
  stroke-width:2;
}

.footer-link{
  appearance:none;
  background:none;
  border:none;
  padding:0;
  margin:0;
  font:inherit;
  color:var(--text);
  cursor:pointer;
  font-weight: normal !important;
}
.footer-link:hover{color:var(--blue);text-decoration:underline;}


.hp-field{
  position:absolute !important;
  left:-9999px !important;
  width:1px !important;
  height:1px !important;
  overflow:hidden !important;
}
.form-feedback{
  margin:0 0 1rem;
  padding:.85rem 1rem;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
}
.form-feedback.is-success{
  border-color:rgba(116,191,42,.35);
  background:rgba(116,191,42,.08);
  color:var(--dark);
}
.form-feedback.is-error{
  border-color:rgba(220,38,38,.22);
  background:rgba(220,38,38,.06);
  color:var(--dark);
}


section[id]{scroll-margin-top:108px;}
.admin-home-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:1rem;}
.admin-home-card{display:flex;gap:1rem;align-items:flex-start;background:#fff;border:1px solid var(--line);border-radius:22px;padding:1.25rem;box-shadow:var(--shadow);text-decoration:none;color:var(--text);transition:.2s ease;}
.admin-home-card:hover{text-decoration:none;transform:translateY(-2px);border-color:rgba(23,63,150,.16);}
.admin-home-card svg{flex:0 0 auto;width:56px;height:56px;}
.admin-home-card strong{display:block;color:var(--dark);font-size:1.1rem;margin-bottom:.2rem;}
.admin-home-card span{color:var(--muted);font-size:.95rem;}
.admin-subnav{display:flex;gap:.75rem;flex-wrap:wrap;margin-bottom:1.25rem;}
.admin-pill{display:inline-flex;padding:.72rem 1rem;border-radius:999px;border:1px solid var(--line);background:#fff;color:var(--text);text-decoration:none;font-weight:700;}
.admin-pill.is-current{background:var(--green);color:#fff;border-color:var(--green);}
.badge-waiting-client{background:rgba(245,158,11,.13);color:#a85b00}
.badge-waiting-supplier{background:rgba(168,85,247,.12);color:#7c3aed}
@media (max-width:860px){section[id]{scroll-margin-top:148px;}.admin-home-grid{grid-template-columns:1fr;}}


/* Modal legal links + admin nav hardening */
.footer-link{display:inline-flex;align-items:center;color:var(--dark);font-weight:600;text-decoration:none;cursor:pointer;}
.footer-link:hover{color:var(--blue);text-decoration:none;}
.admin-subnav{display:flex !important;gap:.75rem !important;flex-wrap:wrap !important;margin:0 0 1.25rem !important;}
.admin-pill{display:inline-flex !important;align-items:center !important;justify-content:center !important;padding:.72rem 1rem !important;border-radius:999px !important;border:1px solid var(--line) !important;background:#fff !important;color:var(--blue) !important;font-weight:700 !important;text-decoration:none !important;box-shadow:0 8px 18px rgba(15,23,42,.04) !important;line-height:1.1 !important;}
.admin-pill:hover{text-decoration:none !important;transform:translateY(-1px);}
.admin-pill.is-current{background:var(--green) !important;border-color:var(--green) !important;color:#fff !important;}


#legalModalBody > *:first-child{margin-top:0;}
#legalModalBody h2{margin-bottom:.75rem;}
#legalModalBody p:first-child{margin-top:0;}
.footer-link{display:inline-flex;align-items:center;white-space:nowrap;}

.legal-link {
  font-weight: normal !important;
}

@media (max-width:640px){
  .footer-made-by {
    width:100%;
    max-width:28rem;
    border-radius:22px;
    padding:.75rem .9rem;
    text-align:left;
  }
}
.contact-block-profile{grid-template-columns:1.15fr .85fr;align-items:stretch}
.profile-card{display:flex;align-items:stretch}
.profile-photo-frame{width:100%;min-height:360px;border-radius:28px;padding:1rem;background:linear-gradient(135deg, rgba(23,63,150,.10), rgba(116,191,42,.16));box-shadow:var(--shadow);display:flex}
.profile-photo-placeholder{flex:1;border:1px dashed rgba(23,63,150,.22);border-radius:22px;background:rgba(255,255,255,.88);display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:1.5rem;color:var(--dark)}
.profile-photo-placeholder span{font-size:1.35rem;font-weight:800;margin-bottom:.25rem}
.profile-photo-placeholder small{color:var(--muted);font-size:.95rem}
@media (max-width:860px){.contact-block-profile{grid-template-columns:1fr;}.profile-photo-frame{min-height:280px}}


.about-layout{
  display:grid;
  grid-template-columns:280px 1fr;
  gap:2rem;
  align-items:flex-start;
}

.about-photo{
  display:flex;
  justify-content:center;
  align-items:center;
}

.about-photo img{
  width:300px;
  height:300px;
  object-fit:cover;
  border-radius:22%;
  border:4px solid #fff;
  box-shadow:0 10px 25px rgba(0,0,0,0.15);
  transition:transform .2s ease;
}

.about-photo img:hover{
  transform:scale(1.03);
  box-shadow:0 0px 25px rgba(116, 191, 42, .5);
}

.about-text{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:1.75rem;
  box-shadow:var(--shadow);
}

.about-text p{
  margin:0 0 1.25rem;
}

.about-text p:last-child{
  margin-bottom:0;
}

@media (max-width: 860px){
  .about-layout{
    grid-template-columns:1fr;
    gap:1.5rem;
  }
  
  .about-photo{
    justify-content:center;
  }
  
  .about-text{
    text-align:left;
  }
}

.fleche-retour {
  display: inline-block;
  text-decoration: none;
  color: #333;
  font-size: 18px;
  font-weight: bold;
  padding: 10px 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
  transition: all 0.3s ease;
  margin-left:20px;
}

.fleche-retour:hover {
  background-color: #f0f0f0;
  color: #000;
  border-color: #999;
  transform: translateX(-5px); /* Petit effet de mouvement au survol */
}

.form-wrap{
  width:100%;
  max-width:none;
}

.contact-form{
  width:100%;
}

.tariff-list{
  list-style:none;
  padding-left:0;
  margin-top:10px;
}

.tariff-list li{
  position:relative;
  padding-left:22px;
  margin-bottom:6px;
}

.tariff-list li::before{
  content:"✓";
  position:absolute;
  left:0;
  color:var(--green);
  font-weight:bold;
}

.admin-top {
  display: flex;
  justify-content: space-between;
  align-items:flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-title-block{
  flex:1 1 auto;
  min-width:0;
}

.form-actions-center {
  grid-column:1 / -1;
  display:flex;
  justify-content:center;
  align-items:center;
  width:100%;
  margin-top:1.5rem;
}

.form-actions-center .btn {
  margin-inline:auto;
}

.toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  font-weight: normal;
}

.toast{
  position:fixed;
  top:20px;
  left:50%;
  transform:translate(-50%,-20px);
  display:flex;
  align-items:center;
  gap:12px;
  max-width:420px;
  width:calc(100% - 2rem);
  padding:14px 18px;
  border-radius:14px;
  font-size:.95rem;
  font-weight:500;
  box-shadow:0 10px 30px rgba(0,0,0,0.15);
  opacity:0;
  transition:all .4s ease;
  z-index:9999;
}

.toast.show{
  opacity:1;
  transform:translate(-50%,0);
}

.toast-success{
  background:rgba(116,191,42,.96);
  color:#fff;
}

.toast-error{
  background:rgba(220,38,38,.96);
  color:#fff;
}

.toast-icon{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  width:28px;
  height:28px;
  border-radius:999px;
  background:rgba(255,255,255,.18);
}

.toast-icon svg{
  width:16px;
  height:16px;
  display:block;
  stroke:currentColor;
}

.toast-message{
  flex:1 1 auto;
  min-width:0;
  line-height:1.4;
}

.toast-close{
  flex:0 0 auto;
  appearance:none;
  background:transparent;
  border:none;
  color:inherit;
  cursor:pointer;
  padding:0;
  margin:0 0 0 4px;
  display:flex;
  align-items:center;
  justify-content:center;
  width:20px;
  height:20px;
  opacity:.9;
}

.toast-close:hover{
  opacity:1;
}

.toast-close svg{
  width:14px;
  height:14px;
  display:block;
  stroke:currentColor;
}

.admin-toast{
  position:fixed;
  right:24px;
  bottom:24px;
  z-index:9999;
  min-width:280px;
  max-width:420px;
  padding:14px 44px 14px 16px;
  border-radius:14px;
  box-shadow:0 16px 40px rgba(15,23,42,.18);
  color:#fff;
  opacity:0;
  transform:translateY(14px);
  transition:opacity .28s ease, transform .28s ease;
}

.admin-toast.is-visible{
  opacity:1;
  transform:translateY(0);
}

.modal-panel .admin-toast,
.admin-page.is-modal .admin-toast{
  position:sticky;
  top:0;
  right:auto;
  bottom:auto;
  left:auto;
  z-index:20;
  width:100%;
  max-width:none;
  min-width:0;
  margin:0 0 1rem;
  border-radius:12px;
  box-shadow:0 10px 26px rgba(15,23,42,.12);
}

.admin-toast-success{
  background:rgba(116,191,42,.96);
}

.admin-toast-error{
  background:rgba(220,38,38,.96);
}

.admin-toast-warning{
  background:rgba(217,119,6,.96);
}

.admin-toast-close{
  position:absolute;
  top:8px;
  right:10px;
  border:none;
  background:transparent;
  color:#fff;
  font-size:1.35rem;
  line-height:1;
  cursor:pointer;
  padding:0;
}

.admin-toast-content{
  font-size:.95rem;
  font-weight:600;
}

@media (max-width:640px){
  .toast{
    top:12px;
    width:calc(100% - 1rem);
    padding:12px 14px;
  }
  
  .admin-toast{
    left:12px;
    right:12px;
    bottom:12px;
    min-width:auto;
    max-width:none;
  }
  
  .modal-panel .admin-toast,
  .admin-page.is-modal .admin-toast{
    left:auto;
    right:auto;
    bottom:auto;
    top:0;
    margin:0 0 .9rem;
  }
}

.admin-table {
  table-layout: auto;
}
.admin-table th:nth-child(1), /* N° de dossier */
.admin-table td:nth-child(1){
}
.admin-table th:nth-child(2), /* Client */
.admin-table td:nth-child(2){
}
.admin-table th:nth-child(3), /* Objet */
.admin-table td:nth-child(3){
}
.admin-table th:nth-child(4), /* Statut */
.admin-table td:nth-child(4){
}
.admin-table th:nth-child(5), /* Planifié */
.admin-table td:nth-child(5){
}
.admin-table tbody tr{
  cursor: pointer;
  transition: background 0.2s ease;
}
.admin-table tbody tr:hover{
  background: rgba(23,63,150,0.04);
}

.toolbar input, select {
  height: 45px; /* Hauteur fixe */
  padding: 5px; /* Espace intérieur */
  box-sizing: border-box; /* Assure que padding/border n'augmentent pas la taille */
}
.toolbar select {
  width: 200px; /* Largeur fixe */
}

.header-logo img {
  height: clamp(40px, 6vw, 70px);
}

/* Apple-like admin menu */
.admin-apple-menu{position:relative;display:inline-flex;margin:0 0 1.25rem;}
.admin-apple-trigger{appearance:none;border:none;background:rgba(255,255,255,.82);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid rgba(226,232,240,.95);box-shadow:0 12px 28px rgba(15,23,42,.08);width:48px;height:48px;border-radius:999px;display:inline-flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;cursor:pointer;color:var(--blue);transition:.2s ease;}
.admin-apple-trigger:hover{transform:translateY(-1px);}
.admin-apple-trigger span{display:block;width:18px;height:2px;border-radius:999px;background:currentColor;transition:transform .22s ease,opacity .22s ease;}
.admin-apple-trigger.is-open span:nth-child(1){transform:translateY(7px) rotate(45deg);}
.admin-apple-trigger.is-open span:nth-child(2){opacity:0;}
.admin-apple-trigger.is-open span:nth-child(3){transform:translateY(-7px) rotate(-45deg);}
.client-create-trigger{
  appearance:none;
  width:48px;
  height:48px;
  margin:0 0 1.25rem;
  padding:0;
  border:1px solid rgba(116,191,42,.22);
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  background:var(--green);
  box-shadow:0 12px 28px rgba(116,191,42,.22);
  cursor:pointer;
  transition:transform .2s ease,box-shadow .2s ease,background .2s ease;
}
.client-create-trigger:hover,
.client-create-trigger:focus-visible{
  background:#62a824;
  box-shadow:0 14px 30px rgba(116,191,42,.32);
  outline:none;
  transform:translateY(-1px);
}
.client-create-trigger svg{
  width:22px;
  height:22px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
}
.admin-apple-popover{
  position:absolute;
  top:calc(100% + .7rem);
  right:0;
  left:auto;
  min-width:280px;
  padding:.55rem;
  border-radius:22px;
  border:1px solid rgba(226,232,240,.95);
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  box-shadow:0 20px 44px rgba(15,23,42,.14);
  opacity:0;
  visibility:hidden;
  transform:translateY(-6px) scale(.96);
  pointer-events:none;
  transition:opacity .2s ease, transform .2s ease, visibility .2s ease;
  z-index:160;
}
.admin-apple-popover.is-open{opacity:1;visibility:visible;transform:translateY(0) scale(1);pointer-events:auto;}
.admin-apple-item{
  display:flex;
  align-items:center;
  gap:.75rem;
  padding:.85rem 1rem;
  border-radius:14px;
  color:var(--dark);
  text-decoration:none;
  font-weight:600;
}
.admin-apple-item:hover{text-decoration:none;background:rgba(23,63,150,.06);}
.admin-apple-group{padding:.15rem 0 .3rem;}
.admin-apple-group-title{padding:.65rem 1rem .35rem;color:var(--muted);font-size:.78rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em;}
.admin-apple-subitem{margin-left:.4rem;padding-left:.85rem;}
.admin-apple-subitem .admin-apple-icon{width:18px;height:18px;flex-basis:18px;}

.admin-apple-item.is-current{background:rgba(116,191,42,.14);color:var(--dark);}
.admin-apple-separator{height:1px;background:var(--line);margin:.35rem .2rem;}
.admin-apple-item-danger:hover{background:rgba(239,68,68,.08);}
.admin-apple-item-advertising:hover{background:rgba(218, 67, 240, 0.08);}
.admin-apple-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  width:20px;
  height:20px;
  color:var(--blue);
  flex:0 0 20px;
}
.admin-apple-icon svg{
  width:18px;
  height:18px;
  stroke:currentColor;
  stroke-width:2;
  fill:none;
}
@media (max-width: 640px){
  .admin-apple-popover{
    right:-4px;
    left:auto;
    min-width:280px;
    max-width:min(90vw, 280px);
  }
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  margin-bottom: 1.5rem;
}

.admin-header h1 {
  margin: 0;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .75rem;
  margin-left: auto;
}

.admin-header-actions .admin-apple-menu {
  margin: 0;
}

.admin-header-actions .client-create-trigger {
  margin: 0;
}

.closed-cell{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
}

.report-btn{
  width:36px;
  height:36px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,.86);
  color:var(--blue);
  border:1px solid var(--line);
  box-shadow:0 8px 18px rgba(15,23,42,.06);
  text-decoration:none;
  transition:.2s ease;
  flex:0 0 auto;
}

.report-btn:hover{
  text-decoration:none;
  transform:translateY(-1px);
  background:#fff;
  box-shadow:0 12px 24px rgba(15,23,42,.10);
}

.request-modal-panel{
  width:min(calc(100% - 1.25rem), 1280px);
  max-height:94vh;
}

.request-modal-body{
  padding:0;
  max-height:calc(94vh - 92px);
}

.request-modal-frame{
  width:100%;
  height:calc(94vh - 92px);
  border:0;
  background:#fff;
}

.intervention-report-modal .header{
  display:none;
}

@media print {
  .header{
    display:block !important;
  }
}

/* =========================================================
Menu admin Apple-like - éléments principaux
========================================================= */

.admin-apple-featured {
  margin-bottom: .35rem;
  background: linear-gradient(135deg, rgba(23, 63, 150, .06), rgba(116, 191, 42, .08));
  border: 1px solid rgba(23, 63, 150, .08);
}

.admin-apple-featured .admin-apple-icon {
  color: var(--blue);
}

.admin-apple-featured span:last-child {
  font-weight: 800;
}

.admin-apple-featured.is-current {
  background: rgba(116, 191, 42, .14);
  border-color: rgba(116, 191, 42, .22);
}

.planned-date-field{
  display:flex;
  flex-direction:column;
  gap:.35rem;
}

.planned-date-row{
  display:flex;
  align-items:center;
  gap:.65rem;
}

.planned-date-row input{
  flex:1;
  min-width:0;
}

.btn-ics{
  white-space:nowrap;
  min-height:44px;
  padding-inline:1rem;
}

@media (max-width:640px){
  .planned-date-row{
    flex-direction:column;
    align-items:stretch;
  }
  
  .btn-ics{
    width:100%;
    justify-content:center;
  }
}

.planned-inline{
  display:flex;
  align-items:center;
  gap:.6rem;
}

.planned-inline input{
  flex:1;
  min-width:0;
}

.btn-ics{
  flex-shrink:0;
  height:42px;
  display:flex;
  align-items:center;
}

.planned-inline{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  gap:.65rem !important;
  width:100% !important;
  flex-wrap:nowrap !important;
}

.planned-inline input[type="datetime-local"]{
  width:auto !important;
  flex:1 1 0 !important;
  min-width:0 !important;
  max-width:none !important;
  margin:0 !important;
}

.planned-inline .btn-ics{
  width:auto !important;
  flex:0 0 auto !important;
  white-space:nowrap !important;
  min-height:48px !important;
  height:auto !important;
  margin:0 !important;
  padding:.85rem 1.05rem !important;
}

.planned-inline,
.planned-date-row{
  max-width:100%;
  overflow:hidden;
}

.planned-inline input[type="datetime-local"],
.planned-date-row input[type="datetime-local"]{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  box-sizing:border-box !important;
  -webkit-appearance:none;
  appearance:none;
}

.is-readonly {
  opacity: 0.55;
  cursor: not-allowed;
  background-color: #f5f5f7;
}/* ==========================================================================
ADMIN — structure commune
========================================================================== */

.admin-page {
  width: 100%;
  min-height: 100vh;
  padding: 2rem 0 4rem;
  background: var(--soft);
}

.admin-page > .container,
.admin-page .container {
  width: min(calc(100% - 2rem), 1280px);
  max-width: 1280px;
  margin-inline: auto;
}

.admin-page.is-modal {
  min-height: auto;
  padding: 1.25rem 0 2rem;
}

.admin-page.is-modal .container {
  width: min(calc(100% - 1.5rem), 1120px);
}

.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.admin-title-block {
  flex: 1 1 auto;
  min-width: 0;
}

.admin-actions {
  display: flex;
  gap: .75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-left: auto;
}

.btn {
  width: auto;
}
.admin-actions .btn {
  font-size: small;
}

.admin-card,
.card,
.admin-section,
.dashboard-card,
.tariff-card {
  width: 100%;
  max-width: none;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.admin-card {
  padding: 1.4rem;
  margin-bottom: 1.25rem;
  border-radius: 24px;
}

.card {
  padding: 1.25rem;
  margin-bottom: 1rem;
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .06);
}

.admin-card h2,
.admin-section h2 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.grid,
.admin-grid,
.grid-stack,
.toolbar,
.table-wrap,
.table-responsive {
  width: 100%;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.grid-stack {
  display: grid;
  gap: 1.25rem;
}

.full,
.is-span-full {
  grid-column: 1 / -1;
}

.admin-section {
  padding: 1.4rem;
  border-radius: 24px;
}

.admin-help,
.client-search-note,
.helper {
  color: var(--muted);
  font-size: .92rem;
}

.client-search-note {
  margin: .4rem 0 0;
  line-height: 1.45;
}

.client-search-selected {
  display: none;
  margin-top: .75rem;
  padding: .75rem .9rem;
  border: 1px solid rgba(116, 191, 42, .35);
  border-radius: 14px;
  background: rgba(116, 191, 42, .08);
  color: var(--dark);
  font-size: .94rem;
}

.client-search-selected.is-visible {
  display: block;
}

.admin-page input,
.admin-page select,
.admin-page textarea,
.admin-page button {
  max-width: 100%;
}

.admin-alert,
.alert {
  margin: 0 0 1rem;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.admin-alert.success,
.alert-success {
  border-color: rgba(116, 191, 42, .35);
  background: rgba(116, 191, 42, .08);
}

.admin-alert.error,
.alert-error {
  border-color: rgba(220, 38, 38, .22);
  background: rgba(220, 38, 38, .06);
}

.admin-alert.warning {
  border-color: rgba(245, 158, 11, .22);
  background: rgba(245, 158, 11, .08);
}

/* ==========================================================================
ADMIN — connexion
========================================================================== */

.admin-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 2rem;
  background: var(--soft);
}

.admin-shell .admin-card {
  width: min(100%, 520px);
  max-width: 520px;
  padding: 1.6rem;
}

.admin-shell .admin-card h1 {
  margin-bottom: .5rem;
  font-size: 2rem;
}

.admin-logo {
  height: 80px;
  margin-bottom: 1rem;
}

/* ==========================================================================
ADMIN — filtres, tableaux et pagination
========================================================================== */

.toolbar {
  display: flex;
  gap: .75rem;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.toolbar .search {
  flex: 1 1 260px;
}

.toolbar input,
.toolbar select {
  height: 45px;
  padding: 5px;
  box-sizing: border-box;
}

.toolbar select {
  width: 200px;
}

.table-wrap,
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.table-responsive {
  border: 0;
  border-radius: 0;
  background: transparent;
}

table.admin-table,
.admin-table {
  width: 100%;
  min-width: 920px;
  table-layout: auto;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: .95rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  font-size: .92rem;
  background: #fafcff;
}

.admin-table tbody tr,
.admin-table tbody tr.js-row-click,
.row-link,
.clickable-row {
  cursor: pointer;
  transition: background .18s ease;
}

.admin-table tbody tr:hover,
.admin-table tbody tr.js-row-click:hover,
.row-link:hover,
.clickable-row:hover {
  background: rgba(23, 63, 150, .04);
}

/* 1 Dossier 
2 Client
3 Objet
4 Statut
5 Clôture
6 Icone
*/
.admin-table th:nth-child(1),
.admin-table td:nth-child(1){
  width: 150px;
}
.admin-table th:nth-child(2),
.admin-table td:nth-child(2),
.admin-table th:nth-child(5),
.admin-table td:nth-child(5),
.admin-table th:nth-child(6),
.admin-table td:nth-child(6) {
  width: 150px;
  white-space: nowrap;
}
.admin-table th:nth-child(3),
.admin-table td:nth-child(3) {
  width: 250px;
}
.admin-table th:nth-child(4),
.admin-table td:nth-child(4) {
  width: 120px;
}

.request-list-table {
  min-width: 780px;
}

.request-list-table th:nth-child(1),
.request-list-table td:nth-child(1) {
  width: 220px;
}

.request-list-table th:nth-child(2),
.request-list-table td:nth-child(2) {
  width: 210px;
}

.request-list-table th:nth-child(3),
.request-list-table td:nth-child(3) {
  width: 230px;
}

.request-list-table th:nth-child(4),
.request-list-table td:nth-child(4) {
  width: 180px;
  white-space: nowrap;
}

.request-list-number-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .45rem;
}

.request-list-number {
  white-space: nowrap;
}

.request-list-status-badges {
  align-items: flex-start;
}

.request-list-status-badges .badge {
  line-height: 1.15;
}
.mini-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.mini-table th,
.mini-table td {
  padding: .75rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.mini-table th {
  color: var(--muted);
  font-size: .9rem;
}

.sort-link {
  color: inherit;
  text-decoration: none;
}

.sort-link:hover {
  color: var(--blue);
  text-decoration: none;
}

.admin-pagination {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.admin-pagination-links {
  display: flex;
  gap: .4rem;
  align-items: center;
  flex-wrap: wrap;
}

.admin-pagination .btn {
  padding: .55rem .8rem;
}

/* ==========================================================================
ADMIN — badges et statuts
========================================================================== */

.badge,
.client-type {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: .35rem .65rem;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 700;
}

.badge-disable {
  background: rgba(138, 140, 142, 0.12);
  color: darkgray;
}

.badge-new {
  background: rgba(59, 130, 246, .12);
  color: #174ea6;
}

.status-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem;
}

.badge-delay-neutral {
  background: #eef2f7;
  color: #475569;
}

.badge-delay-warning {
  background: rgba(245, 158, 11, .13);
  color: #a85b00;
}

.badge-appointment-response {
  border: 1px solid rgba(234, 179, 8, .34);
  background: rgba(250, 204, 21, .22);
  color: #854d0e;
}

.badge-signature-needed {
  border: 1px solid rgba(56, 189, 248, .42);
  background: rgba(56, 189, 248, .16);
  color: #0369a1;
}

.badge-delay-ok {
  background: rgba(34, 197, 94, .12);
  color: #166534;
}

.badge-test-client {
  border-color: rgba(100, 116, 139, .24);
  background: rgba(100, 116, 139, .14);
  color: #475569;
}

.admin-header h1 .badge-test-client {
  display: flex;
  width: max-content;
  margin: .55rem 0 0;
  font-size: .9rem;
}

.client-test-badge-line {
  display: flex;
  width: max-content;
  margin-top: .35rem;
}

.badge-waiting-client {
  background: rgba(245, 158, 11, .13);
  color: #a85b00;
}

.badge-waiting-supplier {
  background: rgba(168, 85, 247, .12);
  color: #7c3aed;
}

.badge-planned {
  background: rgba(34, 197, 94, .12);
  color: #166534;
}

.badge-confirmed {
  gap: .35rem;
}

.badge-confirmed::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: .95rem;
  height: .95rem;
  border-radius: 999px;
  background: #fff;
  color: #22c55e;
  font-size: .68rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, .28);
}

.badge-quote,
.badge-devis {
  background: rgba(239, 68, 68, .12);
  color: #991b1b;
}

.badge-billing {
  background: rgba(245, 158, 11, .13);
  color: #a85b00;
}

.badge-done {
  background: rgba(34, 197, 94, .12);
  color: #166534;
}

.badge-cancelled {
  background: rgba(239, 68, 68, .12);
  color: #991b1b;
}

.badge-status-new,
.badge-status-waiting-client,
.badge-status-waiting-supplier,
.badge-status-quote,
.badge-status-planned,
.badge-status-started,
.badge-status-completed,
.badge-status-billing,
.badge-status-invoiced,
.badge-status-cancelled {
  border: 1px solid rgba(148, 163, 184, .24);
}

.badge-status-new {
  border-color: rgba(59, 130, 246, .26);
  background: rgba(59, 130, 246, .12);
  color: #174ea6;
}

.badge-status-waiting-client {
  border-color: rgba(245, 158, 11, .30);
  background: rgba(245, 158, 11, .14);
  color: #a85b00;
}

.badge-status-waiting-supplier {
  border-color: rgba(168, 85, 247, .28);
  background: rgba(168, 85, 247, .13);
  color: #7c3aed;
}

.badge-status-quote {
  border-color: rgba(236, 72, 153, .28);
  background: rgba(236, 72, 153, .12);
  color: #9d174d;
}

.badge-status-planned {
  border-color: rgba(34, 197, 94, .28);
  background: rgba(34, 197, 94, .13);
  color: #166534;
}

.badge-status-started {
  border-color: rgba(14, 165, 233, .28);
  background: rgba(14, 165, 233, .13);
  color: #0369a1;
}

.badge-status-completed {
  border-color: rgba(59, 130, 246, .28);
  background: rgba(59, 130, 246, .13);
  color: #1d4ed8;
}

.badge-status-billing {
  border-color: rgba(249, 115, 22, .30);
  background: rgba(249, 115, 22, .13);
  color: #9a3412;
}

.badge-status-invoiced {
  border-color: rgba(16, 185, 129, .28);
  background: rgba(16, 185, 129, .13);
  color: #047857;
}

.badge-status-cancelled {
  border-color: rgba(239, 68, 68, .28);
  background: rgba(239, 68, 68, .13);
  color: #991b1b;
}

.badge-needs-signature::after {
  content: "";
  position: absolute;
  top: -0.35rem;
  right: -0.25rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  background: #ff2d00;
  box-shadow: 0 0 0 3px #fff;
}

.client-type-pro {
  border-color: rgba(59, 130, 246, .26);
  background: rgba(59, 130, 246, .12);
  color: #174ea6;
}

.client-type-part {
  border-color: rgba(34, 197, 94, .28);
  background: rgba(34, 197, 94, .12);
  color: #166534;
}

/* ==========================================================================
ADMIN — modale dossier
========================================================================== */

.request-modal-panel {
  width: min(calc(100% - 1.25rem), 1280px);
  max-height: 94vh;
}

.request-modal-body {
  padding: 0;
  max-height: calc(94vh - 92px);
}

.request-modal-frame {
  width: 100%;
  height: calc(94vh - 92px);
  border: 0;
  background: #fff;
}

/* ==========================================================================
ADMIN — fiche dossier
========================================================================== */

.meta-list,
.grid-2-admin {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem 1rem;
}

.intervention-pricing-grid > label,
.intervention-pricing-grid > .intervention-price-field {
  align-self: start;
}

.intervention-price-field {
  display: grid;
  gap: .45rem;
  min-width: 0;
  margin-bottom: 1rem;
}

.intervention-price-field > label {
  display: block;
  margin: 0;
}

.estimated-price-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: .55rem;
  min-width: 0;
}

.actual-duration-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: .55rem;
  min-width: 0;
}

.client-search-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: .55rem;
  min-width: 0;
}

.client-search-control #clientSearch {
  min-width: 0;
}

.price-auto-reset-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(23, 63, 150, .24);
  border-radius: 999px;
  background: rgba(23, 63, 150, .08);
  color: var(--blue);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease, opacity .2s ease;
}

.price-auto-reset-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.price-auto-reset-button:not(:disabled):hover,
.price-auto-reset-button:not(:disabled):focus-visible {
  border-color: rgba(23, 63, 150, .48);
  background: rgba(23, 63, 150, .14);
  transform: rotate(-18deg);
}

.price-auto-reset-button:disabled {
  border-color: #d8dee8;
  background: #f3f5f8;
  color: #94a3b8;
  cursor: default;
  opacity: .72;
}

.meta-item strong {
  display: block;
  margin-bottom: .15rem;
  color: var(--muted);
  font-size: .86rem;
}

.readonly-box {
  padding: .92rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
  color: var(--dark);
}

.copy-trigger {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  cursor: pointer;
  text-decoration: none !important;
}

.copy-trigger:hover {
  text-decoration: none !important;
}

.muted-copy {
  color: var(--muted);
  font-size: .72rem;
  line-height: 1;
  vertical-align: super;
}

.history-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  gap: .65rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--dark);
  font: inherit;
  font-size: 1.35rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.history-toggle:hover {
  opacity: .9;
}

.history-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  transition: transform .18s ease;
}

.history-toggle[aria-expanded="true"] .history-arrow {
  transform: rotate(90deg);
}

.history-collapsible[hidden] {
  display: none;
}

.history-toggle + .history-collapsible {
  margin-top: 1rem;
}

.client-collapse-toggle {
  width: auto;
  margin-top: .9rem;
  padding: .65rem .85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
  color: var(--blue);
  font-size: .94rem;
  font-weight: 800;
}

.client-collapse-toggle:hover {
  background: rgba(23, 63, 150, .06);
  opacity: 1;
}

.client-collapsible-panel {
  margin-top: .9rem;
}

.history-list,
.timeline-list {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.history-item,
.timeline-item {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.timeline-list::before,
.timeline-item::before,
.history-item::before {
  content: none;
  display: none;
}

.history-card,
.timeline-card {
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fafcff;
  box-shadow: none;
}

.timeline-card-mail-issue {
  border-color: rgba(239, 68, 68, .34);
  background: #fff7f7;
}

.history-mail-issue-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .65rem;
  margin-bottom: .85rem;
}

.badge-mail-failed {
  gap: .42rem;
  background: rgba(239, 68, 68, .12);
  color: #991b1b;
}

.badge-mail-failed::before {
  content: "✉";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  background: #fff;
  color: #e34848;
  font-size: .72rem;
  line-height: 1;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, .24);
}

.history-mail-issue-kicker {
  color: #991b1b;
  font-size: .92rem;
  font-weight: 800;
}

.history-mail-issue-text {
  margin: .75rem 0 .35rem;
  color: var(--dark);
}

.history-mail-issue-help {
  margin: 0;
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.5;
}

.timeline-meta {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: .35rem;
}

.timeline-date {
  color: var(--muted);
  font-size: .88rem;
  font-weight: 700;
}

.section-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.client-timeline-list {
  gap: .8rem;
}

.client-timeline-item .timeline-card h3 {
  margin: .45rem 0 .35rem;
  color: var(--dark);
  font-size: 1rem;
}

.client-timeline-item .timeline-card p {
  margin: 0;
  color: var(--text);
}

.timeline-link {
  display: inline-flex;
  align-items: center;
  margin-top: .7rem;
  color: var(--blue);
  font-size: .92rem;
  font-weight: 700;
  text-decoration: none;
}

.timeline-link:hover,
.timeline-link:focus-visible {
  text-decoration: underline;
  outline: none;
}

.portal-admin-panel {
  display: grid;
  gap: 1rem;
}

.portal-link-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: end;
}

.portal-link-box label {
  margin: 0;
}

.portal-account-summary {
  display: grid;
  gap: .35rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}

.portal-account-summary p {
  margin: 0;
  color: var(--text);
}

.maintenance-status-box {
  margin: .75rem 0;
}

.settings-secret-key-section,
.settings-purge-section {
  grid-column: 1 / -1;
}

.danger-checkbox {
  margin-top: .75rem;
}

.btn-danger {
  border-color: grey;
  color: grey;
}

.btn-danger:not(:disabled):hover,
.btn-danger:not(:disabled):focus-visible {
  border-color: rgba(220, 38, 38, .42);
  background: rgba(220, 38, 38, .08);
  color: #9c1c1c;
}

.btn-warning {
  border-color: rgba(217, 119, 6, .28);
  background: #fff7ed;
  color: #b45309;
}

.btn-warning:not(:disabled):hover,
.btn-warning:not(:disabled):focus-visible {
  border-color: rgba(217, 119, 6, .46);
  background: #ffedd5;
  color: #92400e;
}

.portal-temporary-access {
  gap: .8rem;
  background: #f7f1eb;
}

.portal-access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.portal-access-actions form {
  margin: 0;
}

.portal-temporary-access .small-note {
  color: var(--muted);
}

@media (max-width: 760px) {
  .section-title-row {
    flex-direction: column;
  }

  .portal-link-box {
    display: grid;
    grid-template-columns: 1fr;
  }
}

.portal-page {
  min-height: 100vh;
  padding: 0 0 3rem;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fafc 42%, #eef3f8 100%);
}

.portal-container {
  max-width: 980px;
  padding-top: 1.5rem;
}

.portal-site-header .nav {
  justify-content: flex-start;
}

.portal-fixed-head {
  position: sticky;
  top: 0;
  z-index: 140;
  margin: -2rem 0 1.15rem;
  padding: 1rem 0 .85rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98) 0%, rgba(248, 250, 252, .96) 100%);
  border-bottom: 1px solid rgba(226, 232, 240, .86);
  backdrop-filter: blur(16px);
}

.portal-fixed-head .site-header {
  position: static;
  z-index: auto;
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
}

.portal-fixed-head .site-header .container {
  width: 100%;
}

.portal-fixed-head .nav {
  padding: .35rem 0 .55rem;
}

.portal-fixed-head .portal-hero {
  padding: .7rem 0 .85rem;
  border-bottom: 0;
}

.portal-brand {
  display: flex;
  align-items: center;
  padding: .8rem 0 1rem;
}

.portal-brand a {
  display: inline-flex;
  align-items: center;
}

.portal-brand img {
  width: min(280px, 72vw);
  height: auto;
  border-radius: 12px;
}

.portal-hero {
  padding: 2rem 0 1.25rem;
  border-bottom: 1px solid var(--line);
}

.portal-hero h1 {
  margin: .25rem 0 .35rem;
  color: var(--dark);
  font-size: 2.25rem;
  line-height: 1.12;
}

.portal-hero p {
  margin: 0;
  color: var(--muted);
  text-align: left;
}

.portal-hero .eyebrow {
  color: var(--green);
}

.portal-hero-connected {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.portal-validity {
  display: inline-flex;
  align-items: center;
  margin-top: 1rem;
  padding: .35rem .7rem;
  border: 1px solid rgba(116, 191, 42, .24);
  border-radius: 999px;
  background: rgba(116, 191, 42, .08);
  color: #3f8a18;
  font-size: .88rem;
  font-weight: 700;
}

.portal-section {
  margin-top: 1.4rem;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .05);
}

.portal-section h2 {
  margin: 0 0 1rem;
  color: var(--dark);
  font-size: 1.35rem;
  line-height: 1.25;
}

.portal-page .section-target {
  scroll-margin-top: 10rem;
}

.portal-auth-card {
  margin-right: auto;
  margin-left: auto;
  max-width: 560px;
}

.portal-auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 2rem 1rem;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fafc 45%, #eef3f8 100%);
}

.newsletter-public-card {
  width: min(560px, calc(100% - 2rem));
  padding: 1.8rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
  text-align: center;
}

.newsletter-public-card .portal-auth-logo {
  display: block;
  width: min(280px, 82%);
  height: auto;
  margin: 0 auto 1.35rem;
  border-radius: 12px;
}

.newsletter-public-card .eyebrow {
  margin-bottom: .45rem;
  color: var(--green);
}

.newsletter-public-card h1 {
  margin: 0 0 .85rem;
  color: var(--dark);
  font-size: clamp(1.65rem, 4vw, 2.1rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.newsletter-public-card h1,
.newsletter-public-card p {
  overflow-wrap: anywhere;
}

.newsletter-public-card p {
  margin: 0 auto .75rem;
  max-width: 440px;
  color: var(--muted);
  line-height: 1.55;
}

.newsletter-public-card .small-note {
  font-size: .95rem;
}

.newsletter-public-card .portal-auth-form {
  display: grid;
  justify-items: center;
  gap: .9rem;
  margin: 1.2rem 0 0;
}

.newsletter-public-card .btn {
  margin-top: 1rem;
}

.newsletter-public-card .portal-auth-form .btn {
  margin-top: 0;
}

@media (max-width: 560px) {
  .portal-auth-page {
    align-items: flex-start;
    padding: 1rem;
  }

  .newsletter-public-card {
    width: 100%;
    padding: 1.35rem 1.1rem;
    border-radius: 18px;
  }

  .newsletter-public-card .portal-auth-logo {
    width: min(230px, 86%);
    margin-bottom: 1rem;
  }
}

.newsletter-signup-section {
  background: #f8fafc;
}

.newsletter-signup-card {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 1.4rem;
  align-items: center;
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .06);
}

.newsletter-signup-copy h2 {
  margin: .15rem 0 .7rem;
  max-width: 760px;
  color: var(--dark);
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.15;
}

.newsletter-signup-copy p {
  margin: 0 0 .45rem;
  color: var(--muted);
}

.newsletter-signup-form {
  display: grid;
  gap: .85rem;
}

.newsletter-signup-form label {
  display: grid;
  gap: .4rem;
  font-weight: 700;
  color: var(--dark);
}

.newsletter-signup-form input[type="email"] {
  width: 100%;
}

.newsletter-signup-feedback {
  margin-top: 1rem;
  padding: .85rem 1rem;
  border-radius: 14px;
  font-weight: 700;
}

.newsletter-signup-feedback.is-success {
  border: 1px solid rgba(116, 191, 42, .26);
  background: rgba(116, 191, 42, .1);
  color: #367b14;
}

.newsletter-signup-feedback.is-error {
  border: 1px solid rgba(220, 38, 38, .22);
  background: rgba(220, 38, 38, .08);
  color: #991b1b;
}

.newsletter-client-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.newsletter-client-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
}

.newsletter-client-card h3 {
  margin: 0 0 .75rem;
  color: var(--dark);
  font-size: 1rem;
}

.newsletter-client-meta {
  display: grid;
  gap: .6rem;
  margin: .8rem 0 0;
}

.newsletter-client-meta div {
  display: grid;
  gap: .15rem;
}

.newsletter-client-meta dt {
  color: var(--muted);
  font-weight: 800;
}

.newsletter-client-meta dd {
  margin: 0;
  color: var(--text);
}

.welcome-voucher-notice {
  margin-top: 1rem;
}

.welcome-voucher-notice p {
  margin: .4rem 0 .8rem;
}

.welcome-voucher-request-card {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
  scroll-margin-top: 9rem;
}

.welcome-voucher-request-card h3 {
  margin: 0 0 .75rem;
  color: var(--dark);
  font-size: 1rem;
}

.portal-newsletter-actions {
  margin-top: 1rem;
}

.portal-newsletter-actions .btn {
  width: fit-content;
}

.portal-newsletter-events {
  margin-top: 1rem;
}

@media (max-width: 760px) {
  .newsletter-signup-card,
  .newsletter-client-grid {
    grid-template-columns: 1fr;
  }

  .newsletter-signup-card {
    padding: 1.15rem;
    border-radius: 18px;
  }
}

.portal-form {
  display: grid;
  gap: 1rem;
}

.portal-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portal-password-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.portal-password-current {
  grid-column: 1;
  grid-row: 1;
}

.portal-password-new {
  grid-column: 2;
  grid-row: 1;
}

.portal-password-confirm {
  grid-column: 2;
  grid-row: 2;
}

.portal-form label {
  display: grid;
  gap: .45rem;
  margin: 0;
  color: var(--muted);
  font-weight: 400;
}

.portal-form input {
  width: 100%;
}

.portal-form-wide,
.portal-form-actions {
  grid-column: 1 / -1;
}

.portal-form-actions {
  display: flex;
  justify-content: flex-start;
}

.portal-alert {
  margin: 0 0 1rem;
  padding: .85rem 1rem;
  border-radius: 14px;
  font-weight: 700;
  text-align: left;
}

.portal-alert-error {
  border: 1px solid rgba(185, 28, 28, .18);
  background: #fef2f2;
  color: #991b1b;
}

.portal-alert-success {
  border: 1px solid rgba(116, 191, 42, .24);
  background: rgba(116, 191, 42, .09);
  color: #3f8a18;
}

.portal-alert-info {
  border: 1px solid rgba(29, 78, 216, .18);
  background: #eff6ff;
  color: var(--blue);
}

.portal-subtle-link {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
  display: block;
  text-align: right;
  font-size: small;
}

.portal-subtle-link:hover,
.portal-subtle-link:focus-visible {
  text-decoration: underline;
  outline: none;
}

.portal-document-list {
  display: grid;
  gap: .9rem;
}

.portal-fixed-head .portal-section-nav {
  position: static;
  top: auto;
  z-index: auto;
  margin: .8rem 0 0;
}

.portal-document {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fafcff;
}

.portal-document h3 {
  margin: .4rem 0 .2rem;
  color: var(--dark);
  font-size: 1rem;
}

.portal-document p {
  margin: 0;
  color: var(--text);
  text-align: left;
}

.portal-document small {
  color: var(--muted);
  font-weight: 600;
}

.portal-confirmation {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fafcff;
}

.portal-confirmation-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
}

.portal-confirmation-head h3 {
  margin: .4rem 0 .2rem;
  color: var(--dark);
  font-size: 1rem;
}

.portal-confirmation-head p {
  margin: 0;
  text-align: left;
}

.portal-confirmation-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.portal-consent-line {
  grid-template-columns: auto 1fr;
  align-items: start;
  color: var(--text) !important;
  font-weight: 500 !important;
}

.portal-consent-line input {
  width: auto;
  margin-top: .2rem;
}

.portal-withdrawal-box {
  display: grid;
  gap: .75rem;
  margin-top: .85rem;
  padding: 1rem;
  border: 1px solid rgba(245, 158, 11, .3);
  border-radius: 16px;
  background: rgba(245, 158, 11, .1);
}

.portal-withdrawal-box h4 {
  margin: 0;
  color: var(--dark);
  font-size: 1rem;
}

.portal-withdrawal-box p {
  margin: 0;
  color: var(--text);
  text-align: left;
}

.portal-withdrawal-box .small-note {
  color: var(--muted);
}

.portal-consent-line-important {
  margin: .1rem 0;
  padding: .75rem;
  border: 1px solid rgba(23, 63, 150, .16);
  border-radius: 12px;
  background: #fff;
}

.portal-consent-line-important span {
  color: var(--dark);
  font-weight: 800;
}

.portal-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.portal-table-wrap .mini-table {
  min-width: 680px;
}

.portal-doc-icons {
  width: 1%;
  white-space: nowrap;
}

.portal-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-right: .25rem;
  border: 1px solid rgba(23, 63, 150, .18);
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  vertical-align: middle;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.portal-icon-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.portal-icon-link:hover,
.portal-icon-link:focus-visible {
  border-color: rgba(23, 63, 150, .38);
  background: rgba(23, 63, 150, .06);
}

.portal-icon-link.is-disabled {
  opacity: .36;
  cursor: not-allowed;
}

.portal-global-download {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

.portal-confirmations-list {
  margin-bottom: 1rem;
}

@media (max-width: 700px) {
  .portal-page {
    padding-top: 0;
  }

  .portal-fixed-head {
    margin-top: -1rem;
    padding-top: .75rem;
  }

  .portal-fixed-head .nav {
    padding-bottom: .25rem;
  }

  .portal-page .section-target {
    scroll-margin-top: 9rem;
  }

  .portal-section {
    padding: 1rem;
    border-radius: 16px;
  }

  .portal-hero h1 {
    font-size: 1.75rem;
  }

  .portal-section h2 {
    font-size: 1.22rem;
  }

  .portal-document {
    grid-template-columns: 1fr;
  }

  .portal-document .btn {
    width: 100%;
  }

  .portal-confirmation-head {
    grid-template-columns: 1fr;
  }

  .portal-confirmation-head .btn {
    width: 100%;
  }

  .portal-hero-connected,
  .portal-form-grid {
    grid-template-columns: 1fr;
  }

  .portal-password-current,
  .portal-password-new,
  .portal-password-confirm {
    grid-column: auto;
    grid-row: auto;
  }

  .portal-hero-connected {
    flex-direction: column;
  }
}

.planned-date-field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.planned-date-row,
.planned-inline {
  display: flex;
  align-items: center;
  gap: .65rem;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.planned-date-row input,
.planned-inline input[type="datetime-local"] {
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.btn-ics,
.planned-inline .btn-ics {
  flex: 0 0 auto;
  min-height: 48px;
  width: auto;
  margin: 0;
  padding: .85rem 1.05rem;
  white-space: nowrap;
}

.client-dependent-fields {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.client-dependent-fields:disabled {
  opacity: .62;
}

.client-dependent-fields:disabled .admin-card {
  filter: grayscale(.12);
}

.tariff-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: end;
  gap: .65rem;
  width: 100%;
  min-width: 0;
}

.tariff-action-row label {
  min-width: 0;
  margin: 0;
}

.tariff-contract-create-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 0 .05rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  box-shadow: 0 12px 24px rgba(116, 191, 42, .24);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease;
}

.tariff-contract-create-button svg {
  width: 1.25rem;
  height: 1.25rem;
}

.tariff-contract-create-button:not(:disabled):hover,
.tariff-contract-create-button:not(:disabled):focus-visible {
  background: #62a824;
  box-shadow: 0 14px 28px rgba(116, 191, 42, .32);
  outline: none;
  transform: translateY(-1px);
}

.tariff-contract-create-button:disabled {
  background: #d8dee8;
  color: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
  opacity: .75;
}

.status-fields-panel,
.quote-fields {
  display: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 1rem;
  padding: 1rem;
  overflow: hidden;
  border: 1px solid rgba(239, 68, 68, .24);
  border-radius: 18px;
  background: rgba(239, 68, 68, .065);
}

.status-fields-panel.is-visible,
.quote-fields.is-visible {
  display: block;
}

.invoice-fields.status-fields-panel {
  border-color: rgba(245, 158, 11, .72) !important;
  background: #fff7ed !important;
}

.actual-time-panel.is-completed {
  border-color: rgba(59, 130, 246, .34);
  background: rgba(59, 130, 246, .08);
}

.actual-time-panel.is-completed .readonly-box {
  border-color: rgba(59, 130, 246, .25);
  background: rgba(59, 130, 246, .10);
}

.actual-time-panel.is-completed .readonly-box strong {
  color: #174ea6;
}

.appointment-confirmation-panel.is-confirmed,
.request-consent-panel.is-confirmed {
  border-color: rgba(34, 197, 94, .34);
  background: rgba(34, 197, 94, .08);
}

.appointment-confirmed-box,
.positive-readonly-box {
  border-color: rgba(34, 197, 94, .28);
  background: rgba(34, 197, 94, .12);
}

.appointment-confirmed-box strong,
.positive-readonly-box strong {
  color: #166534;
}

.status-fields-panel h3,
.quote-fields h3 {
  margin: 0 0 1rem;
}

.request-consent-panel {
  margin-bottom: 1.35rem;
  font-size: .92rem;
}

.request-consent-panel h3 {
  font-size: 1rem;
}

.request-signed-notice {
  margin-top: 1.2rem;
}

.request-resolution-field {
  margin-top: 1.2rem;
}

.request-completion-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: .85rem;
  margin-bottom: 1.2rem;
}

.request-completion-prompt[hidden] {
  display: none;
}

.request-completion-prompt-text {
  font-weight: 700;
  color: #166534;
}

.request-completion-prompt-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.status-fields-panel label,
.status-fields-panel .grid-2-admin,
.quote-fields label,
.quote-fields .grid-2-admin,
.invoice-fields label,
.invoice-fields .grid-2-admin {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.status-fields-panel input,
.status-fields-panel select,
.status-fields-panel textarea,
.quote-fields input,
.quote-fields select,
.quote-fields textarea,
.invoice-fields input,
.invoice-fields select,
.invoice-fields textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.status-fields-panel input[type="date"],
.status-fields-panel input[type="datetime-local"],
.quote-fields input[type="date"],
.quote-fields input[type="datetime-local"],
.invoice-fields input[type="date"],
.invoice-fields input[type="datetime-local"] {
  -webkit-appearance: none;
  appearance: none;
}

.status-required-field {
  border-color: rgba(220, 38, 38, .35) !important;
  background: rgba(239, 68, 68, .13) !important;
}

.status-required-field:focus {
  border-color: rgba(220, 38, 38, .62) !important;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, .12) !important;
}

.invoice-fields .status-required-field {
  border-color: rgba(245, 158, 11, .78) !important;
  background: #ffedd5 !important;
}

.invoice-fields .status-required-field:focus {
  border-color: rgba(234, 88, 12, .86) !important;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, .20) !important;
}

.invoice-readonly-box,
.quote-readonly-box {
  margin-top: 1rem;
}

/* ==========================================================================
ADMIN — fiche client
========================================================================== */

.secret-value {
  margin-top: .5rem;
  padding: .75rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fafcff;
  white-space: pre-wrap;
}

.secret-mask {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-width: 110px;
  min-height: 42px;
  padding: .55rem .8rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fafcff;
  color: var(--dark);
  font: inherit;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.secret-mask:hover {
  border-color: rgba(23, 63, 150, .35);
  background: rgba(23, 63, 150, .04);
}

.notice {
  margin-bottom: 1rem;
  padding: .85rem 1rem;
  border: 1px solid rgba(23, 63, 150, .12);
  border-radius: 14px;
  background: rgba(23, 63, 150, .06);
}

.is-hidden {
  display: none !important;
}

.delete-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: rgba(220, 38, 38, .1);
  color: #b91c1c;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.delete-inline:hover {
  background: rgba(220, 38, 38, .18);
}

.row-with-delete {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
}

.row-with-delete form {
  display: flex;
  align-items: center;
  margin: 0;
}

.row-with-delete .row-main {
  min-width: 0;
}

.client-devices-table {
  min-width: 860px;
  table-layout: fixed;
}

.client-devices-table th:nth-child(1),
.client-devices-table td:nth-child(1) {
  width: 32%;
}

.client-devices-table th:nth-child(2),
.client-devices-table td:nth-child(2) {
  width: 22%;
}

.client-devices-table th:nth-child(3),
.client-devices-table td:nth-child(3) {
  width: 16%;
}

.client-devices-table th:nth-child(4),
.client-devices-table td:nth-child(4) {
  width: 30%;
}

.client-devices-table th,
.client-devices-table td {
  white-space: normal;
}

.client-devices-table .row-main,
.client-notes-table .row-main {
  min-width: 0;
  overflow-wrap: anywhere;
}

.client-notes-table {
  min-width: 0;
  table-layout: fixed;
}

.client-notes-table td {
  width: 100%;
  text-align: left;
  white-space: normal;
}

.client-notes-table .row-with-delete {
  justify-content: flex-start;
  width: 100%;
}

.client-notes-table .row-main {
  flex: 1 1 auto;
  text-align: left;
}

.is-readonly {
  opacity: .55;
  cursor: not-allowed;
  background-color: #f5f5f7;
}

/* ==========================================================================
ADMIN — dashboard et recherche globale
========================================================================== */

.admin-page-dashboard .dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.dashboard-card {
  padding: 1.15rem;
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .06);
}

.dashboard-card strong {
  display: block;
  margin-top: .45rem;
  color: var(--dark);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1;
}

.dashboard-card span {
  color: var(--muted);
  font-weight: 700;
}

.dashboard-card:hover {
  border-color: rgba(23, 63, 150, .35);
  background: rgba(23, 63, 150, .06);
  color: var(--blue);
  text-decoration: none;
}
.dashboard-card a:hover {
  text-decoration: none;
}

.dashboard-layout,
.dashboard-layout-single {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
}

.quick-filters {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin: 0 0 1rem;
}

.quick-filter {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .55rem .8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--dark);
  font-size: .92rem;
  font-weight: 700;
  text-decoration: none;
}

.quick-filter:hover,
.quick-filter.is-active {
  border-color: rgba(23, 63, 150, .35);
  background: rgba(23, 63, 150, .06);
  color: var(--blue);
  text-decoration: none;
}

.global-search-results {
  display: grid;
  gap: 1rem;
}

.result-card {
  display: block;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.result-card:hover {
  border-color: rgba(23, 63, 150, .28);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
  text-decoration: none;
}

.result-type {
  color: var(--green);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ==========================================================================
ADMIN — tarifs
========================================================================== */

.tariff-grid,
.compact-form {
  display: grid;
  gap: 1.1rem;
}

.tariff-card {
  padding: 1rem 1rem .95rem;
  border-radius: 22px;
}

.tariff-card .row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr) minmax(120px, 140px);
  gap: .85rem;
}

.tariff-card label {
  display: block;
}

.tariff-card label > span {
  display: block;
  margin-bottom: .34rem;
  font-weight: 700;
}

.tariff-card input[type="text"],
.tariff-card input[type="number"],
.tariff-card textarea {
  width: 100%;
}

.tariff-card textarea {
  min-height: 58px;
  resize: vertical;
}

.tariff-save-all,
.tariff-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: .9rem;
}

.tariff-delete-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: .9rem;
}

.toggle-row,
.tariff-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: .95rem;
}

.add-toggles {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2.25rem;
  flex-wrap: wrap;
  margin-top: .95rem;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: normal;
  line-height: 1;
}

.toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
  vertical-align: middle;
  flex-shrink: 0;
}

.toggle-copy {
  white-space: nowrap;
  display: inline-block;
}
.secondary-form {
  margin: 0;
}

.section-separator {
  height: 2px;
  margin: 1.6rem 0 1.15rem;
  background: linear-gradient(90deg, transparent, rgba(23, 63, 150, .18), rgba(116, 191, 42, .24), transparent);
}

.section-title {
  margin: 0 0 1rem;
  color: var(--dark);
  font-size: 1.2rem;
  font-weight: 800;
}

/* ==========================================================================
ADMIN — composants utilitaires
========================================================================== */

.closed-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.report-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
  color: var(--blue);
  text-decoration: none;
  transition: .2s ease;
}

.report-btn:hover {
  transform: translateY(-1px);
  background: #fff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .10);
  text-decoration: none;
}

.report-btn.is-disabled {
  color: #94a3b8;
  background: #f8fafc;
  box-shadow: none;
  cursor: not-allowed;
  opacity: .7;
}

.report-btn.is-disabled:hover {
  transform: none;
  background: #f8fafc;
  box-shadow: none;
}

.form-actions-center {
  display: flex;
  grid-column: 1 / -1;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 1.5rem;
}

.form-actions-center .btn {
  margin-inline: auto;
}

.is-soft-warning {
  border-color: rgba(245, 158, 11, .28);
  background: rgba(245, 158, 11, .12);
}

.is-soft-success {
  border-color: rgba(34, 197, 94, .28);
  background: rgba(34, 197, 94, .12);
}

.appointment-response-notice p {
  margin: .45rem 0 0;
}

.is-withdrawal-warning {
  margin-top: .9rem;
  border-color: rgba(245, 158, 11, .34);
  background: rgba(245, 158, 11, .12);
}

.is-withdrawal-warning strong {
  display: block;
  margin-bottom: .4rem;
  color: #92400e;
}

.is-withdrawal-warning p {
  margin: .35rem 0 0;
  color: var(--text);
}

.m-compact-top {
  margin: .75rem 0 0;
}

.list-spaced {
  margin: .75rem 0 0;
  padding-left: 1.25rem;
}

.flex-toolbar-inline {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.flex-toolbar-inline .toggle, .add-toggles .toggle {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .45rem;
  margin: 0;
  padding: 0;
  min-width: auto;
  line-height: 1;
}

.header-logo img {
  height: clamp(40px, 6vw, 70px);
}

.intervention-report-modal .header {
  display: none;
}

@media print {
  .header {
    display: block !important;
  }
}

/* ==========================================================================
ADMIN — responsive
========================================================================== */

@media (max-width: 960px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .admin-page-dashboard .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .grid,
  .meta-list,
  .grid-2-admin,
  .tariff-card .row {
    grid-template-columns: 1fr;
  }
  
  .toggle-row,
  .tariff-bottom {
    align-items: flex-start;
  }
  
  .tariff-bottom {
    flex-direction: column;
  }
  
  .secondary-form {
    align-self: stretch;
  }
  
  .secondary-form .btn {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .admin-page > .container,
  .admin-page .container {
    width: min(calc(100% - 1rem), 1280px);
  }
  
  .admin-page .admin-card,
  .admin-page .card,
  .admin-page .admin-section {
    padding: 1rem;
    border-radius: 20px;
  }
  
  .mini-table {
    min-width: 680px;
  }
}

@media (max-width: 640px) {
  .request-modal-frame {
    height: 95vh;
  }
  
  .request-modal-panel {
    width: min(calc(100% - .5rem), 1280px);
    max-height: 98vh;
  }
  
  .request-modal-body {
    max-height: calc(98vh - 82px);
  }
  
  .admin-page-dashboard .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .planned-date-row,
  .planned-inline {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btn-ics,
  .planned-inline .btn-ics {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
ADMIN — correctif mobile dashboard / prochains rendez-vous
========================================================================== */

.admin-page-dashboard .dashboard-layout,
.admin-page-dashboard .dashboard-layout-single,
.admin-page-dashboard .dashboard-layout > *,
.admin-page-dashboard .card,
.admin-page-dashboard .table-wrap {
  min-width: 0;
  max-width: 100%;
}

.admin-page-dashboard .dashboard-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.admin-page-dashboard .dashboard-upcoming-table {
  width: 100%;
  min-width: 760px;
}

@media (max-width: 640px) {
  .admin-page-dashboard {
    overflow-x: hidden;
  }
  
  .admin-page-dashboard .container {
    width: calc(100% - 1rem);
    max-width: calc(100% - 1rem);
  }
  
  .admin-page-dashboard .card {
    overflow: hidden;
  }
  
  .admin-page-dashboard .dashboard-table-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
  }
  
  .admin-page-dashboard .dashboard-upcoming-table {
    min-width: 640px;
  }
}


/* =========================================================
Avis clients - Responsive
========================================================= */

@media (max-width:900px) {
  .testimonials-track {
    min-height:220px;
  }
}

@media (max-width:640px) {
  .testimonials-header {
    margin-bottom:1rem;
  }
  
  .testimonials-track {
    min-height:255px;
  }
  
  .testimonial-slide blockquote {
    font-size:1.05rem;
  }
  
  .testimonials-controls {
    margin-top:1.1rem;
  }
  
  .testimonial-control {
    width:38px;
    height:38px;
    font-size:1.55rem;
  }
  
  .testimonial-contact {
    align-items:flex-start;
    flex-direction:column;
    gap:.45rem;
  }
}

/* =======================================================================
ADMIN — avis clients
======================================================================= */

.testimonials-admin-grid {
  grid-template-columns: minmax(0, 1fr);
}

.testimonials-form-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(110px, 140px);
}

.testimonials-table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0;
}

/*
* Tableau dédié aux avis clients.
* Les largeurs sont définies via colgroup pour éviter les conflits
* avec les règles globales des tableaux admin.
*/
.testimonials-admin-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.testimonials-admin-table col.delete-col {
  width: 48px;
}

.testimonials-admin-table col.order-col {
  width: 90px;
}

.testimonials-admin-table col.client-col {
  width: 230px;
}

.testimonials-admin-table col.summary-col {
  width: auto;
}

.testimonials-admin-table col.status-col {
  width: 120px;
}

/* Neutralisation des largeurs globales nth-child du tableau admin */
.testimonials-admin-table th:nth-child(1),
.testimonials-admin-table td:nth-child(1),
.testimonials-admin-table th:nth-child(5),
.testimonials-admin-table td:nth-child(5),
.testimonials-admin-table th:nth-child(6),
.testimonials-admin-table td:nth-child(6) {
  width: auto;
}

/* Colonne suppression */
.testimonials-admin-table th.delete-column,
.testimonials-admin-table td.delete-column {
  width: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  padding: .85rem .35rem .85rem .85rem !important;
  text-align: center !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
}

/* Ligne cliquable */
.testimonials-admin-table tbody tr.testimonial-row {
  cursor: pointer;
  transition: background .18s ease;
}

.testimonials-admin-table tbody tr.testimonial-row:hover {
  background: rgba(23, 63, 150, .04);
}

.testimonials-admin-table tbody tr.testimonial-row:focus-visible {
  outline: 3px solid rgba(116, 191, 42, .26);
  outline-offset: -3px;
}

/* Formulaire de suppression */
.testimonial-delete-form {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin: 0;
}

/* Bouton suppression compact */
.icon-delete-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(220, 38, 38, .10);
  color: #b91c1c;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: background .18s ease;
}

.icon-delete-button:hover {
  background: rgba(220, 38, 38, .18);
}

.icon-delete-button:focus-visible {
  outline: 3px solid rgba(220, 38, 38, .22);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .testimonials-form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .testimonials-admin-table {
    min-width: 620px;
  }
}

/* =======================================================================
ADMIN — générateur de newsletter
======================================================================= */

.newsletter-admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}

.newsletter-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.newsletter-overview-card {
  min-height: 100%;
}

.newsletter-overview-card strong {
  display: block;
  margin-top: .2rem;
  color: var(--dark);
  font-size: 2rem;
  line-height: 1;
}

.newsletter-overview-card p {
  margin: .55rem 0 0;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.35;
}

.newsletter-pending-panel {
  margin-bottom: 1.25rem;
}

.newsletter-pending-list {
  display: grid;
  gap: .75rem;
}

.newsletter-pending-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .85rem;
  align-items: center;
  padding: .9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.newsletter-pending-item strong,
.newsletter-pending-item span,
.newsletter-pending-item p {
  display: block;
}

.newsletter-pending-item strong {
  color: var(--dark);
  font-size: 1rem;
}

.newsletter-pending-item span {
  margin-top: .15rem;
  color: var(--blue);
  font-size: .92rem;
  overflow-wrap: anywhere;
}

.newsletter-pending-item p {
  margin: .35rem 0 0;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.35;
}

.newsletter-pending-item form {
  margin: 0;
}

.newsletter-pending-error {
  color: #b42318 !important;
}

.newsletter-status-doc {
  margin-top: 1.25rem;
}

.newsletter-status-doc summary {
  cursor: pointer;
  color: var(--dark);
  font-size: 1.15rem;
  font-weight: 800;
}

.newsletter-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
  margin-top: 1rem;
}

.newsletter-status-card {
  padding: .95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.newsletter-status-card dl {
  display: grid;
  gap: .7rem;
  margin: .8rem 0 0;
}

.newsletter-status-card dt {
  color: var(--dark);
  font-size: .86rem;
  font-weight: 800;
}

.newsletter-status-card dd {
  margin: .15rem 0 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.4;
}

.newsletter-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.newsletter-section-head h2 {
  margin-bottom: .35rem;
}

.newsletter-create-trigger {
  flex: 0 0 48px;
  margin: 0;
}

.newsletter-editor-modal-panel {
  width: min(calc(100% - 1.5rem), 1040px);
  max-height: 94vh;
  margin: 3vh auto;
}

.newsletter-editor-modal-body {
  max-height: calc(94vh - 92px);
  padding: 1.25rem;
}

.newsletter-editor {
  width: 100%;
  min-width: 0;
}

.newsletter-editor-heading {
  margin-bottom: 1.15rem;
}

.newsletter-form {
  display: grid;
  gap: 1rem;
}

.newsletter-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.newsletter-form-row-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.newsletter-type-row {
  align-items: stretch;
}

.newsletter-type-help {
  display: grid;
  align-content: center;
  gap: .25rem;
  min-width: 0;
  padding: .9rem 1rem;
  border: 1px solid rgba(23, 63, 150, .16);
  border-radius: 16px;
  background: rgba(23, 63, 150, .055);
}

.newsletter-type-help strong,
.newsletter-type-help span {
  display: block;
}

.newsletter-type-help strong {
  color: var(--blue);
  font-size: .96rem;
  font-weight: 850;
}

.newsletter-type-help span {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.35;
}

.newsletter-form label {
  min-width: 0;
  overflow: hidden;
  margin-bottom: 0;
}

.newsletter-period-field {
  display: grid;
  gap: .35rem;
  min-width: 0;
  overflow: hidden;
}

.newsletter-period-field .form-label {
  color: var(--dark);
  font-weight: 800;
}

.newsletter-period-selectors {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(92px, .65fr);
  gap: .6rem;
  min-width: 0;
}

.newsletter-form input,
.newsletter-form select,
.newsletter-form textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.newsletter-form input[type="month"],
.newsletter-form input[type="datetime-local"] {
  display: block;
  box-sizing: border-box;
  inline-size: 100%;
  min-inline-size: 0;
  max-inline-size: 100%;
}

.newsletter-scheduled-field {
  min-width: 0;
  overflow: visible !important;
}

.newsletter-form textarea {
  min-height: 110px;
  resize: vertical;
}

.newsletter-current-image {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: .85rem;
  align-items: center;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(245, 247, 251, .72);
}

.newsletter-current-image img {
  display: block;
  width: 86px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
  background: #fff;
}

.newsletter-current-image strong,
.newsletter-current-image span {
  display: block;
}

.newsletter-current-image strong {
  color: var(--dark);
  font-size: .95rem;
}

.newsletter-current-image span {
  margin-top: .15rem;
  color: var(--muted);
  font-size: .85rem;
  overflow-wrap: anywhere;
}

.newsletter-monthly-fields {
  display: grid;
  gap: 1rem;
}

.newsletter-monthly-fields[hidden],
.newsletter-free-editor[hidden] {
  display: none !important;
}

.newsletter-free-editor {
  display: grid;
  gap: .95rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fafc;
}

.newsletter-free-editor-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.newsletter-free-editor-head h3 {
  margin: 0 0 .35rem;
  color: var(--dark);
  font-size: 1.08rem;
}

.newsletter-free-editor-head .admin-help {
  margin: 0;
}

.newsletter-free-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.newsletter-free-toolbar button,
.newsletter-free-block-actions button {
  min-height: 34px;
  padding: .45rem .72rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-size: .82rem;
  font-weight: 800;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, transform .2s ease;
}

.newsletter-free-toolbar button:hover,
.newsletter-free-block-actions button:hover:not(:disabled) {
  border-color: rgba(97, 184, 50, .55);
  color: var(--green);
  transform: translateY(-1px);
}

.newsletter-free-blocks {
  display: grid;
  gap: .85rem;
}

.newsletter-free-block {
  display: grid;
  gap: .85rem;
  padding: .9rem;
  border: 1px solid #dbe7f5;
  border-radius: 16px;
  background: #fff;
}

.newsletter-free-block.is-separator {
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.newsletter-free-block-head {
  display: flex;
  gap: .75rem;
  align-items: center;
  justify-content: space-between;
}

.newsletter-free-block-head strong {
  color: var(--dark);
  font-size: .9rem;
}

.newsletter-free-block-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .35rem;
  justify-content: flex-end;
}

.newsletter-free-block-actions button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.newsletter-free-block-actions button[data-block-remove] {
  color: #b42318;
}

.newsletter-free-block-options {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(150px, 1fr) auto auto;
  gap: .75rem;
  align-items: end;
}

.newsletter-free-block-options label,
.newsletter-free-block-body label,
.newsletter-free-button-fields label {
  display: grid;
  gap: .35rem;
}

.newsletter-free-block-options span,
.newsletter-free-block-body span,
.newsletter-free-button-fields span {
  color: var(--dark);
  font-size: .82rem;
  font-weight: 800;
}

.newsletter-free-check {
  display: inline-flex !important;
  grid-template-columns: auto auto;
  gap: .45rem !important;
  align-items: center;
  min-height: 44px;
  padding: .55rem .7rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.newsletter-free-check input {
  width: auto;
  min-width: 0;
  margin: 0;
}

.newsletter-free-check span {
  white-space: nowrap;
}

.newsletter-free-button-fields {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr);
  gap: .75rem;
}

.newsletter-free-separator-note {
  margin: 0;
  padding: .75rem .9rem;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  color: var(--muted);
  font-size: .9rem;
}

.newsletter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: flex-end;
  margin-top: .25rem;
}

.newsletter-history-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.newsletter-history-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(126px, 1fr)) minmax(220px, 1.35fr) auto;
  gap: .75rem;
  align-items: end;
  margin-bottom: 1rem;
}

.newsletter-history-filters label {
  display: grid;
  gap: .35rem;
  margin: 0;
  color: var(--dark);
  font-size: .82rem;
  font-weight: 800;
}

.newsletter-history-filters select,
.newsletter-history-filters input {
  min-height: 44px;
  margin: 0;
  font-size: .92rem;
}

.newsletter-history-filter-actions {
  display: inline-flex;
  gap: .45rem;
  align-items: center;
  justify-content: flex-end;
}

.newsletter-history-filter-actions .btn {
  min-height: 44px;
  padding: .7rem 1rem;
  white-space: nowrap;
}

.newsletter-year-export-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.1rem;
}

.newsletter-year-export-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
}

.newsletter-year-export-button svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.newsletter-year-export-button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.newsletter-history-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: .85rem;
  align-items: stretch;
  padding: .95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.newsletter-history-card-head {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  justify-content: space-between;
}

.newsletter-history-card-footer {
  display: grid;
  grid-template-columns: max-content minmax(136px, 180px);
  gap: .85rem;
  align-items: center;
  justify-content: space-between;
}

.newsletter-history-card-body {
  min-width: 0;
}

.newsletter-history-card-head .badge {
  flex: 0 0 auto;
}

.newsletter-history-item strong,
.newsletter-history-item span,
.newsletter-history-item p {
  display: block;
}

.newsletter-history-item strong {
  color: var(--dark);
  font-size: 1rem;
}

.newsletter-history-item .newsletter-history-kicker {
  display: grid;
  gap: .15rem;
  min-width: 0;
  margin: 0;
  text-transform: uppercase;
}

.newsletter-history-item .newsletter-history-period,
.newsletter-history-item .newsletter-history-type,
.newsletter-history-item .newsletter-history-category {
  min-width: 0;
  margin: 0;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.newsletter-history-item .newsletter-history-type {
  color: var(--blue);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .02em;
}

.newsletter-history-item .newsletter-history-type-free {
  color: #f97316;
}

.newsletter-history-item .newsletter-history-period {
  color: #64748b;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .02em;
}

.newsletter-history-item .newsletter-history-category {
  color: var(--green);
  font-size: .82rem;
  font-weight: 850;
  letter-spacing: .01em;
}

.newsletter-history-item .newsletter-history-category-actualite_clic_solution {
  color: #b91c1c;
}

.newsletter-history-item span:not(.newsletter-history-period):not(.newsletter-history-type):not(.newsletter-history-category):not(.badge) {
  margin-top: .15rem;
  color: var(--muted);
  font-size: .88rem;
}

.newsletter-history-item p {
  margin: .4rem 0 0;
  color: var(--dark);
  font-size: .92rem;
  line-height: 1.35;
}

.newsletter-history-card-body {
  display: grid;
  gap: .55rem;
}

.newsletter-history-card-body .newsletter-history-title {
  margin-top: .35rem;
}

.newsletter-history-card-body .newsletter-history-subject {
  margin: 0;
}

.newsletter-campaign-meta {
  display: block;
  margin-top: .25rem;
}

.newsletter-campaign-meta span {
  margin-top: 0;
}

.newsletter-status-form {
  display: inline-grid;
  grid-template-columns: minmax(0, 180px) 2.35rem;
  gap: .45rem;
  align-items: center;
  justify-self: end;
  width: max-content;
  max-width: 100%;
  margin: 0;
}

.newsletter-status-select {
  width: 100%;
  max-width: none;
  min-height: 36px;
  padding: .35rem 2rem .35rem .75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background-color: #fff;
  color: var(--dark);
  font-size: .84rem;
  font-weight: 700;
}

.newsletter-campaign-counts {
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.35;
}

.newsletter-history-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: .45rem;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  overflow: visible;
}

.newsletter-history-actions form {
  display: inline-flex;
  flex: 0 0 auto;
  margin: 0;
}

.newsletter-history-actions .mini-icon,
.newsletter-status-form .mini-icon {
  flex: 0 0 2.35rem;
  width: 2.35rem;
  min-width: 2.35rem;
  max-width: 2.35rem;
  height: 2.35rem;
  min-height: 2.35rem;
  max-height: 2.35rem;
}

@media (max-width: 980px) {
  .newsletter-admin-grid {
    grid-template-columns: 1fr;
  }

  .newsletter-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .newsletter-history-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .newsletter-history-filter-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 860px) {
  .newsletter-history-list {
    grid-template-columns: 1fr;
  }

  .newsletter-history-card-footer {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .newsletter-status-form {
    justify-self: stretch;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 2.35rem;
  }

  .newsletter-status-select {
    max-width: 100%;
  }
}

@media (max-width: 700px) {
  .newsletter-editor-modal-panel {
    width: min(calc(100% - .75rem), 1040px);
    max-height: 97vh;
    margin: 1.5vh auto;
  }

  .newsletter-editor-modal-body {
    max-height: calc(97vh - 86px);
    padding: .9rem;
  }

  .newsletter-overview-grid {
    grid-template-columns: 1fr;
  }

  .newsletter-form-row {
    grid-template-columns: 1fr;
  }

  .newsletter-scheduled-field input[type="datetime-local"] {
    width: 100%;
    inline-size: 100%;
    min-width: 0;
    max-width: 100%;
    -webkit-appearance: none;
    appearance: none;
  }

  .newsletter-period-selectors {
    grid-template-columns: 1fr;
  }

  .newsletter-form-row-three {
    grid-template-columns: 1fr;
  }

  .newsletter-status-grid {
    grid-template-columns: 1fr;
  }

  .newsletter-history-filters {
    grid-template-columns: 1fr;
  }

  .newsletter-history-filter-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .newsletter-history-filter-actions .btn {
    width: 100%;
  }

  .newsletter-free-editor-head,
  .newsletter-free-block-head {
    display: grid;
  }

  .newsletter-free-editor-head .btn {
    width: 100%;
  }

  .newsletter-free-block-options,
  .newsletter-free-button-fields {
    grid-template-columns: 1fr;
  }

  .newsletter-year-export-button {
    width: 100%;
  }

  .newsletter-history-list {
    grid-template-columns: 1fr;
  }

  .newsletter-history-card-head {
    align-items: stretch;
  }

  .newsletter-history-card-footer {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .newsletter-status-form,
  .newsletter-status-select {
    width: 100%;
    max-width: none;
  }

  .newsletter-status-form {
    grid-template-columns: minmax(0, 1fr) 2.35rem;
  }

  .newsletter-actions {
    justify-content: stretch;
  }

  .newsletter-actions .btn {
    width: 100%;
  }

  .newsletter-history-item {
    grid-template-columns: 1fr;
  }

  .newsletter-history-actions {
    justify-content: flex-start;
  }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================
Avis clients - Lien avis Google
========================================================= */

.google-review-logo svg {
  display: block;
  width: 100%;
  height: 100%;
}

.google-review-brand {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: .65rem;
  color: var(--dark);
  font-weight: 800;
  
}

.google-review-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-size: 1.15rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
  flex: 0 0 auto;
}

.google-review-link {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.google-review-link:hover {
  text-decoration: underline;
}

.testimonial-google-review {
  align-items: flex-end;
  flex-direction: column;
}

@media (max-width: 640px) {
  .testimonial-google-review {
    align-items: flex-end;
    flex-direction: column;
    gap: .65rem;
  }
}

/* =========================================================
Pages légales - ligne mise à jour + PDF
========================================================= */

.legal-update-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.5rem;
}

.legal-update-note {
  margin: 0;
}

.legal-pdf-btn {
  flex: 0 0 auto;
  min-height: 42px;
  padding: .65rem 1rem;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .legal-update-row {
    align-items: flex-start;
    flex-direction: column;
    gap: .75rem;
  }
  
  .legal-pdf-btn {
    width: 100%;
  }
}

/* Bons d’intervention */
.form-section-card {
  margin-bottom: 18px;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
}

.checkbox-line input[type="checkbox"] {
  width: auto;
  min-width: 18px;
  height: 18px;
}

.checkbox-line span {
  margin: 0;
  font-weight: 600;
}

.checkbox-line-admin {
  align-self: end;
  min-height: 56px;
}

.checkbox-line-admin.is-included-in-premium {
  align-self: stretch;
  padding: 12px 14px;
  border: 1px solid rgba(41, 128, 185, .24);
  border-radius: 12px;
  background: rgba(41, 128, 185, .08);
  color: #2276ad;
  cursor: not-allowed;
}

.checkbox-line-admin.is-included-in-premium input[type="checkbox"] {
  opacity: .48;
}

.checkbox-line-admin.is-included-in-premium span {
  color: inherit;
}

.checkbox-line-admin.is-unavailable {
  align-self: stretch;
  padding: 12px 14px;
  border: 1px solid #d8dee8;
  border-radius: 12px;
  background: #f3f5f8;
  color: #6b7280;
  cursor: not-allowed;
}

.checkbox-line-admin.is-unavailable input[type="checkbox"] {
  opacity: .45;
}

.checkbox-line-admin.is-unavailable span {
  color: inherit;
}

.serenity-travel-option {
  margin: 12px 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(102, 195, 38, .28);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(102, 195, 38, .08), rgba(37, 99, 235, .045));
}

.serenity-travel-option .small-note {
  margin: 2px 0 0;
}

.serenity-travel-option.locked-field {
  background: #f6f8fb;
}

.premium-contract-empty-state {
  margin-top: 10px;
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, .2);
  border-radius: 12px;
  background: rgba(37, 99, 235, .06);
}

.request-contract-field > label {
  margin-bottom: 0;
}

.request-contract-field {
  margin-bottom: 1rem;
}

.is-price-disabled {
  opacity: .7;
}

.is-price-disabled input:disabled {
  background: #eef2f7;
  border-color: #d8dee8;
  color: #64748b;
  cursor: not-allowed;
}

.premium-contract-empty-state p {
  margin: 0 0 10px;
}

.premium-contract-empty-state p:last-child {
  margin: 10px 0 0;
}

.premium-contract-empty-state .btn {
  width: auto;
}

/* En-tête de dossier dans une fiche ouverte en modale. */
.admin-request-heading-card {
  padding-top: 24px;
  padding-bottom: 24px;
}

.admin-request-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-request-heading h1 {
  margin: 0;
}

.btn.is-disabled,
.btn[aria-disabled="true"] {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}


/* Contrats et crédits d’heures */
.client-credits-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.client-credits-header h2 {
  margin: 0;
}

.contract-create-submit,
.client-section-create-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 14px 30px rgba(30, 64, 175, .18);
  cursor: pointer;
  transition: .2s ease;
}

.contract-create-submit:hover,
.contract-create-submit:focus-visible,
.client-section-create-submit:hover,
.client-section-create-submit:focus-visible {
  color: #fff;
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(30, 64, 175, .24);
}

.contract-create-submit svg,
.client-section-create-submit svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.client-contract-create-separator {
  height: 1px;
  margin: 1.55rem 0 1.3rem;
  background: linear-gradient(90deg, transparent, rgba(15, 23, 42, .13), transparent);
}

.contracts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.contract-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
}

.contract-card h3 {
  margin: 0 0 .45rem;
}

.contract-card p {
  margin: .45rem 0;
}

.contract-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .85rem;
}

.contract-usage-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
  text-decoration: none;
  transition: .2s ease;
}

.contract-usage-download:hover,
.contract-usage-download:focus-visible {
  color: var(--blue);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, .10);
}

.contract-usage-download svg {
  width: 1.15rem;
  height: 1.15rem;
}

.contract-progress {
  display: block;
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
  background: #e2e8f0;
  margin: .9rem 0;
}

.contract-progress::-webkit-progress-bar {
  background: #e2e8f0;
  border-radius: 999px;
}

.contract-progress::-webkit-progress-value {
  background: var(--green);
  border-radius: 999px;
}

.contract-progress::-moz-progress-bar {
  background: var(--green);
  border-radius: 999px;
}

.contract-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: .7rem;
  width: 100%;
  margin-top: .85rem;
}

.contract-actions > .btn {
  width: auto;
  justify-self: start;
  white-space: nowrap;
}

.inline-form {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.admin-users-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
  gap: 1.25rem;
  align-items: start;
}

.admin-users-main {
  display: grid;
  gap: 1.25rem;
}

.admin-users-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .8rem;
  align-items: center;
  margin-bottom: 1rem;
}

.admin-users-search {
  min-height: 3rem;
}

.admin-users-list {
  display: grid;
  gap: .75rem;
}

.admin-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.admin-user-id {
  display: flex;
  align-items: center;
  gap: .85rem;
  min-width: 0;
}

.admin-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.8rem;
  height: 2.8rem;
  line-height: 1;
  border-radius: 999px;
  background: rgba(23, 63, 150, .09);
  color: var(--blue);
  font-weight: 900;
  text-align: center;
}

.admin-user-id > div > strong,
.admin-user-id > div > span {
  display: block;
}

.admin-user-id > div > strong {
  color: var(--dark);
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-user-id > div > span {
  color: var(--muted);
  font-size: .9rem;
}

.admin-user-badges,
.admin-user-actions {
  display: flex;
  justify-content: flex-end;
  gap: .45rem;
  flex-wrap: wrap;
}

.admin-user-role-badge {
  color: var(--blue);
  background: rgba(23, 63, 150, .09);
}

.admin-user-role-owner {
  color: #fff;
  background: var(--blue);
}

.admin-user-role-admin {
  color: #245617;
  background: rgba(116, 191, 42, .16);
}

.admin-user-role-readonly {
  color: #475569;
  background: #f1f5f9;
}

.mini-icon {
  display: inline-flex;
  flex: 0 0 2.35rem;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  min-width: 2.35rem;
  max-width: 2.35rem;
  height: 2.35rem;
  min-height: 2.35rem;
  max-height: 2.35rem;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue);
  background: #fff;
  font: inherit;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.mini-icon:hover,
.mini-icon:focus-visible {
  border-color: rgba(23, 63, 150, .34);
  background: rgba(23, 63, 150, .06);
  outline: none;
  transform: translateY(-1px);
}

.mini-icon-primary {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
  box-shadow: 0 10px 20px rgba(23, 63, 150, .18);
}

.mini-icon-primary:hover,
.mini-icon-primary:focus-visible {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
  filter: brightness(1.05);
}

.mini-icon-danger {
  color: #991b1b;
}

.mini-icon-danger:hover,
.mini-icon-danger:focus-visible {
  border-color: rgba(153, 27, 27, .28);
  background: rgba(239, 68, 68, .08);
}

.mini-icon-disabled {
  color: #64748b;
  background: #f1f5f9;
  cursor: default;
}

.mini-icon-disabled:hover,
.mini-icon-disabled:focus-visible {
  border-color: var(--line);
  background: #f1f5f9;
  outline: none;
  transform: none;
}

.mini-icon-glyph {
  display: block;
  margin: 0;
  color: inherit;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
}

.mini-icon svg {
  display: block;
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-user-editor {
  position: sticky;
  top: 1rem;
}

.admin-user-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.admin-user-editor-head p {
  margin: .25rem 0 0;
  color: var(--muted);
  font-size: .9rem;
  text-align: left;
}

.admin-user-form {
  display: grid;
  gap: .9rem;
}

.admin-user-permissions {
  display: grid;
  gap: .9rem;
  margin-top: .4rem;
}

.admin-user-permissions-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}

.admin-user-permissions-head h2 {
  margin-bottom: 0;
}

.admin-user-permissions-head .btn {
  min-height: 2.35rem;
  padding: .55rem .8rem;
  font-size: .82rem;
}

.admin-permission-group {
  display: grid;
  gap: .55rem;
}

.admin-permission-group h3 {
  margin: .35rem 0 0;
  color: var(--dark);
  font-size: 1rem;
}

.permission-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .8rem;
  align-items: center;
  padding: .72rem .8rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.permission-toggle span,
.permission-toggle small,
.permission-toggle strong {
  display: block;
}

.permission-toggle strong {
  color: var(--dark);
  font-size: .93rem;
}

.permission-toggle small {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 500;
}

.permission-toggle input {
  width: 1.15rem;
  min-width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--green);
}

.admin-access-timeline {
  display: grid;
  gap: .7rem;
}

.admin-access-event {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .75rem;
  align-items: center;
}

.admin-access-dot {
  width: .85rem;
  height: .85rem;
  border: 3px solid rgba(116, 191, 42, .3);
  border-radius: 999px;
  background: var(--green);
}

.admin-access-event > div {
  padding: .8rem .9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.admin-access-event strong,
.admin-access-event span {
  display: block;
}

.admin-access-event strong {
  color: var(--dark);
  font-size: .92rem;
}

.admin-access-event span,
.admin-access-event p {
  color: var(--muted);
  font-size: .82rem;
}

.admin-access-event p {
  margin: .25rem 0 0;
  text-align: left;
}

@media (max-width: 960px) {
  .admin-users-grid,
  .admin-users-toolbar,
  .admin-user-row {
    grid-template-columns: 1fr;
  }

  .admin-user-editor {
    position: static;
  }

  .admin-user-badges,
  .admin-user-actions {
    justify-content: flex-start;
  }
}

input.is-readonly {
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}
.contract-card-archived {
  opacity: .86;
  background: #f8fafc;
}

.contract-archive-trigger {
  grid-column: 3;
  justify-self: end !important;
  margin-left: auto;
  width: fit-content;
  cursor: pointer;
  border-color: rgba(185, 28, 28, .28);
  background: #fff1f2;
  color: #b42318;
}

.contract-archive-trigger:hover,
.contract-archive-trigger:focus-visible {
  border-color: rgba(185, 28, 28, .46);
  background: #ffe4e6;
  color: #991b1b;
}

.contract-consume-trigger {
  grid-column: 2;
  justify-self: end !important;
  width: fit-content;
  cursor: pointer;
  border-color: rgba(217, 119, 6, .28);
  background: #fff7ed;
  color: #b45309;
}

.contract-consume-trigger:hover,
.contract-consume-trigger:focus-visible {
  border-color: rgba(217, 119, 6, .46);
  background: #ffedd5;
  color: #92400e;
}

.contract-archive-form,
.contract-consume-form {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: .85rem;
}

.contract-archive-form {
  padding: .9rem;
  border: 1px solid rgba(220, 38, 38, .2);
  border-radius: 12px;
  background: rgba(254, 242, 242, .72);
}

.contract-consume-form {
  padding: .9rem;
  border: 1px solid rgba(217, 119, 6, .22);
  border-radius: 12px;
  background: rgba(255, 247, 237, .82);
}

.contract-archive-form[hidden],
.contract-consume-form[hidden] {
  display: none;
}

.contract-archive-form label,
.contract-consume-form label {
  margin-bottom: .65rem;
}

.contract-archive-summary {
  margin: .85rem 0;
  padding: .85rem;
  border-left: 4px solid #64748b;
  border-radius: 10px;
  background: #eef2f7;
}

.contracts-archive-details {
  margin-top: 1.2rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.contracts-archive-details summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--dark);
}

.contracts-grid-archived {
  margin-top: 1rem;
}

/* ==========================================================================
ADMIN — navigation interne des fiches client et intervention
========================================================================== */

.section-nav {
  position: sticky;
  top: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: .45rem;
  width: 100%;
  margin: 0 0 1.15rem;
  padding: .45rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 14px 32px rgba(15, 23, 42, .06);
  backdrop-filter: blur(12px);
  -webkit-overflow-scrolling: touch;
}

.section-nav a {
  flex: 1 0 auto;
  min-width: max-content;
  padding: .8rem 1rem;
  border-radius: 14px;
  color: var(--dark);
  font-size: .92rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.section-nav a:hover,
.section-nav a:focus-visible {
  color: var(--blue);
  background: rgba(23, 63, 150, .08);
  outline: none;
  transform: translateY(-1px);
}

.section-nav a:first-child {
  background: var(--blue);
  color: #fff;
}

.section-target {
  scroll-margin-top: 7rem;
}

.admin-page.is-modal .section-nav {
  top: 0;
  border-radius: 16px;
  margin-top: 0;
}

.admin-page.is-modal .section-target {
  scroll-margin-top: 7rem;
}

@media (max-width: 760px) {
  .section-nav {
    position: sticky;
    top: 0;
    margin-bottom: 1rem;
    padding: .35rem;
    border-radius: 14px;
  }
  
  .section-nav a {
    flex: 0 0 auto;
    padding: .7rem .85rem;
    font-size: .86rem;
  }
}

.section-nav a.is-active {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 22px rgba(23, 63, 150, .16);
}

.section-nav a:first-child:not(.is-active) {
  background: transparent;
  color: var(--dark);
  box-shadow: none;
}

/* Bouton d'enregistrement intégré à la navigation interne des modales. */
.section-save-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-left: .2rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  box-shadow: 0 12px 24px rgba(116, 191, 42, .24);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.section-save-btn:hover,
.section-save-btn:focus-visible {
  background: #62a824;
  box-shadow: 0 14px 28px rgba(116, 191, 42, .32);
  outline: none;
  transform: translateY(-1px);
}

.section-save-btn svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 760px) {
  .section-save-btn {
    width: 2.55rem;
    height: 2.55rem;
  }
}

/* Signature client tactile */
.signature-panel {
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--soft);
}

.signature-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .85rem;
}

.signature-panel-header h3 {
  margin: 0 0 .25rem;
  color: var(--dark);
}

.signature-canvas-wrap {
  height: 220px;
  border: 1px dashed #94a3b8;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  touch-action: none;
}

.signature-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.signature-workflow-page .admin-top {
  margin-bottom: 1rem;
}

.signature-modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.signature-summary-card .meta-list {
  margin-bottom: 1rem;
}

.signature-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.signature-summary-grid .readonly-box {
  min-height: 100%;
}

.signature-confirm-line {
  padding: .9rem 1rem;
  border: 1px solid rgba(116, 191, 42, .24);
  border-radius: 16px;
  background: rgba(116, 191, 42, .07);
}

@media (max-width: 700px) {
  .signature-panel-header {
    flex-direction: column;
  }
  
  .signature-canvas-wrap {
    height: 180px;
  }

  .signature-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
ADMIN — notes repliables
========================================================================== */

.collapsible-note {
  overflow: hidden;
}

.collapsible-note-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--dark);
}

.collapsible-note-summary::-webkit-details-marker {
  display: none;
}

.collapsible-note-summary::after {
  content: "›";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--soft);
  color: var(--blue);
  font-size: 1.35rem;
  line-height: 1;
  transform: rotate(90deg);
  transition: transform .18s ease, background .18s ease;
}

.collapsible-note[open] .collapsible-note-summary::after {
  transform: rotate(-90deg);
  background: rgba(23, 63, 150, .10);
}

.collapsible-note-summary span {
  font-size: 1.25rem;
}

.collapsible-note-summary small {
  display: block;
  margin-top: .15rem;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 500;
}

.collapsible-note-content {
  margin-top: 1.25rem;
}

/* ==========================================================================
ADMIN — champs verrouillés / champs effectifs
========================================================================== */

.locked-field span {
  color: #94a3b8;
}

.locked-field input,
.locked-field textarea,
.locked-field select,
.locked-field .readonly-box {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #64748b;
  box-shadow: none;
}

.locked-field input[readonly],
.locked-field textarea[readonly],
.locked-field select:disabled {
  cursor: not-allowed;
}

.editable-effective-field span {
  color: var(--dark);
}

.editable-effective-field input,
.editable-effective-field textarea,
.editable-effective-field select {
  background: #ffffff;
  border-color: rgba(23, 63, 150, .32);
  box-shadow: 0 0 0 3px rgba(23, 63, 150, .06);
}

/* Option d'exemption de signature pour les interventions à distance/téléphone. */
.signature-exemption-option {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  margin-top: .75rem;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--soft);
  font-weight: 700;
}

.signature-exemption-option input {
  width: auto;
  min-width: 18px;
  margin-top: .15rem;
}
.signature-exemption-option.is-hidden {
  display: none;
}

/* Bouton d'export RGPD intégré à la navigation interne. */
.section-export-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-left: .2rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #fff !important;
  background: #f59e0b !important;
  box-shadow: 0 12px 24px rgba(245, 158, 11, .24);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.section-export-btn:hover,
.section-export-btn:focus-visible {
  background: #d97706 !important;
  box-shadow: 0 14px 28px rgba(245, 158, 11, .32);
  outline: none;
  transform: translateY(-1px);
}

.section-export-btn svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 760px) {
  .section-export-btn {
    width: 2.55rem;
    height: 2.55rem;
  }
}

.request-credit-contracts {
  margin-top: 1rem;
}

.contract-card-selectable {
  position: relative;
}

.contract-select-radio {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  width: auto;
  margin: 0;
  padding: .45rem .7rem;
  border: 1px solid rgba(23, 63, 150, .18);
  border-radius: 999px;
  background: rgba(23, 63, 150, .06);
  color: var(--blue);
  font-size: .82rem;
  font-weight: 800;
  cursor: pointer;
}

.contract-select-radio input {
  width: auto;
  margin: 0;
  accent-color: var(--blue);
}

/* Correctif mobile — formulaire de création des crédits d’heures */
@media (max-width: 720px) {
  #client-credits .grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  
  #client-credits .grid > *,
  #client-credits label,
  #client-credits input,
  #client-credits select,
  #client-credits textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  
  #client-credits input[type="date"],
  #client-credits input[type="datetime-local"],
  #client-credits input[type="time"] {
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
  }
}

/* =========================================================
Documents légaux - style Apple-like
À ajouter dans css/style.css
========================================================= */

.legal-document {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(1rem, 2.4vw, 2rem);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.legal-document *,
.legal-document *::before,
.legal-document *::after {
  box-sizing: border-box;
}

.legal-hero {
  position: relative;
  margin: 0 0 1.4rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid rgba(226, 232, 240, .95);
  border-radius: 28px;
  background:
  radial-gradient(circle at 0% 0%, rgba(116, 191, 42, .18), transparent 22rem),
  radial-gradient(circle at 100% 0%, rgba(23, 63, 150, .14), transparent 24rem),
  linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 250, 252, .92));
  box-shadow: 0 18px 44px rgba(15, 23, 42, .08);
  overflow: hidden;
}

.legal-hero::after {
  content: "";
  position: absolute;
  right: -4rem;
  bottom: -4rem;
  width: 12rem;
  height: 12rem;
  border-radius: 999px;
  background: rgba(116, 191, 42, .12);
  border: 1px solid rgba(116, 191, 42, .18);
}

.legal-kicker {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: .85rem;
  color: var(--green);
  font-size: .78rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .095em;
}

.legal-kicker::before {
  content: "";
  width: .55rem;
  height: .55rem;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 5px rgba(116, 191, 42, .13);
}

.legal-hero-content {
  position: relative;
  z-index: 1;
}

.legal-hero p {
  max-width: 820px;
  margin: 0;
  color: #2f3d52;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.75;
}

.legal-card-grid {
  display: grid;
  gap: 1rem;
}

.legal-card {
  padding: clamp(1.15rem, 2.4vw, 1.65rem);
  border: 1px solid rgba(226, 232, 240, .95);
  border-radius: 24px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .055);
}

.legal-card h3 {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  margin: 0 0 .85rem;
  color: var(--dark);
  font-size: clamp(1.1rem, 1.7vw, 1.35rem);
  line-height: 1.25;
  letter-spacing: -.025em;
}

.legal-card h3::before {
  content: "";
  flex: 0 0 auto;
  width: .72rem;
  height: .72rem;
  margin-top: .36rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green), #9de06f);
  box-shadow: 0 0 0 5px rgba(116, 191, 42, .13);
}

.legal-card p,
.legal-card ul {
  margin: .65rem 0 0;
  color: #344054;
  font-size: .98rem;
  line-height: 1.75;
}

.legal-card p:first-of-type {
  margin-top: 0;
}

.legal-card p strong {
  color: var(--dark);
  font-weight: 760;
}

.legal-card a {
  color: var(--blue);
  font-weight: 650;
  text-decoration: none;
  border-bottom: 1px solid rgba(23, 63, 150, .24);
}

.legal-card a:hover {
  border-bottom-color: currentColor;
}

.legal-card ul {
  padding: .95rem 1rem .95rem 2.1rem;
  border: 1px solid rgba(226, 232, 240, .85);
  border-radius: 18px;
  background: rgba(248, 250, 252, .72);
}

.legal-card li {
  margin: .35rem 0;
  padding-left: .15rem;
}

.legal-card li::marker {
  color: var(--green);
}

.legal-card br + strong,
.legal-card p:first-of-type strong {
  display: inline-block;
  margin-bottom: .18rem;
}

@media (max-width: 720px) {
  .legal-document {
    padding: .85rem;
  }
  
  .legal-hero,
  .legal-card {
    border-radius: 22px;
  }
  
  .legal-card h3 {
    gap: .55rem;
  }
  
  .legal-card ul {
    padding-left: 1.75rem;
  }
}


.legal-meta-card {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  align-items: center;
  justify-content: space-between;
  margin: -0.35rem 0 1rem;
  padding: .8rem 1rem;
  border: 1px solid rgba(226, 232, 240, .95);
  border-radius: 18px;
  background: rgba(255, 255, 255, .88);
  color: var(--muted);
  font-size: .9rem;
  font-weight: 650;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .045);
}

@media (max-width: 640px) {
  .legal-meta-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ==========================================================================
Dashboard statistiques — version SaaS/Apple-like
========================================================================== */

.admin-dashboard-v2 {
  background:
  radial-gradient(circle at 12% 8%, rgba(23, 63, 150, .08), transparent 28%),
  radial-gradient(circle at 90% 12%, rgba(116, 191, 42, .08), transparent 30%),
  #f8fafc;
}

.admin-dashboard-v2 .container {
  max-width: 1440px;
}

.dashboard-hero {
  align-items: center;
  margin-bottom: 1.35rem;
}

.dashboard-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .75rem;
  flex: 0 0 auto;
  min-width: 0;
}

.dashboard-hero-actions .admin-toast {
  position: relative;
  right: auto;
  bottom: auto;
  left: auto;
  z-index: 20;
  display: flex;
  align-items: center;
  width: auto;
  min-width: 280px;
  max-width: 420px;
  margin: 0;
  transform: translateY(-8px);
}

.dashboard-hero-actions .admin-toast.is-visible {
  transform: translateY(0);
}

.dashboard-subtitle {
  margin: .25rem 0 0;
  color: var(--muted);
  font-weight: 500;
}

.dashboard-period-form {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  flex: 0 0 auto;
  min-width: 0;
}

.dashboard-period-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  min-height: 48px;
  padding: .7rem 1.15rem;
  border: 1px solid rgba(226, 232, 240, .95);
  border-radius: 16px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
  color: var(--dark);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.dashboard-period-pill input[type="month"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.dashboard-period-pill span:last-child,
.dashboard-period-pill span {
  pointer-events: none;
}

.dashboard-period-nav,
.dashboard-period-today {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid rgba(226, 232, 240, .95);
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .05);
  color: var(--blue);
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.dashboard-period-nav {
  width: 48px;
  border-radius: 999px;
  font-size: 1.7rem;
}

.dashboard-period-today {
  padding: .65rem .9rem;
  border-radius: 999px;
  font-size: .86rem;
}

.dashboard-period-nav:hover,
.dashboard-period-today:hover,
.dashboard-period-pill:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.dashboard-period-nav.is-disabled {
  opacity: .35;
  pointer-events: none;
}

.dashboard-kpi-grid,
.dashboard-main-grid,
.dashboard-mini-grid {
  display: grid;
  gap: 1rem;
}

.dashboard-kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.dashboard-kpi-card,
.dashboard-panel,
.dashboard-mini-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 24px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 18px 42px rgba(15, 23, 42, .07);
}

.dashboard-kpi-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 118px;
  padding: 1.15rem;
}

.dashboard-kpi-card::after,
.dashboard-panel::after,
.dashboard-mini-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, .65), rgba(255, 255, 255, 0));
}

.dashboard-kpi-card > *,
.dashboard-panel > *,
.dashboard-mini-card > * {
  position: relative;
  z-index: 1;
}

.dashboard-kpi-card span:not(.dashboard-kpi-icon),
.dashboard-money-grid span,
.dashboard-mini-card span,
.dashboard-stat-row span {
  color: #1f3b62;
  font-size: .9rem;
  font-weight: 700;
}

.dashboard-kpi-card strong {
  display: block;
  margin-top: .35rem;
  color: #08142c;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  line-height: 1;
}

.dashboard-kpi-card small,
.dashboard-money-grid small,
.dashboard-mini-card small {
  display: inline-flex;
  margin-top: .45rem;
  color: var(--muted);
  font-weight: 700;
}

.dashboard-kpi-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 20px;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25), 0 14px 26px rgba(15, 23, 42, .1);
}

.dashboard-kpi-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-kpi-blue .dashboard-kpi-icon { background: linear-gradient(135deg, #2f7cff, #8ab4ff); }
.dashboard-kpi-green .dashboard-kpi-icon { background: linear-gradient(135deg, #27ae60, #89df99); }
.dashboard-kpi-indigo .dashboard-kpi-icon { background: linear-gradient(135deg, #2457d6, #9bb5ff); }
.dashboard-kpi-orange .dashboard-kpi-icon { background: linear-gradient(135deg, #ff8a1f, #ffd19a); }
.dashboard-kpi-cyan .dashboard-kpi-icon { background: linear-gradient(135deg, #0aa6b5, #92ecef); }
.dashboard-kpi-red .dashboard-kpi-icon { background: linear-gradient(135deg, #B5240A, #EFA192); }

.visitor-counter-kpi-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0;
}

.visitor-counter-kpi-grid .dashboard-kpi-card {
  min-height: 132px;
}

.visitor-counter-kpi-grid .dashboard-kpi-card > div {
  min-width: 0;
}

.visitor-counter-kpi-grid .dashboard-kpi-card small {
  display: block;
  line-height: 1.35;
}

.is-positive { color: #078b45 !important; }
.is-negative { color: #dc2626 !important; }

.dashboard-main-grid {
  grid-template-columns: 1.25fr 1fr 1fr;
  align-items: stretch;
}

.dashboard-panel {
  min-height: 280px;
  padding: 1.35rem;
}

.dashboard-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.dashboard-panel-header h2 {
  margin: 0;
  color: #08142c;
  font-size: 1.18rem;
  line-height: 1.2;
}

.dashboard-panel-header span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 32px;
  padding: .35rem .65rem;
  border-radius: 999px;
  background: #f3f7fb;
  color: #1f3b62;
  font-size: .86rem;
  font-weight: 800;
}

.dashboard-revenue-panel {
  grid-column: span 1;
}

.dashboard-money-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.dashboard-money-grid strong {
  display: block;
  margin-top: .4rem;
  color: #08142c;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  line-height: 1;
}

.dashboard-bar-chart {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .75rem;
  align-items: end;
  height: 150px;
  padding: .75rem .4rem 0;
  border-top: 1px solid rgba(226, 232, 240, .9);
}

.dashboard-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: .55rem;
  height: 100%;
}

.dashboard-bar {
  display: block;
  width: 100%;
  max-width: 34px;
  height: var(--bar-height);
  min-height: 8px;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, #1f7aff, #b9d8ff);
  box-shadow: 0 10px 22px rgba(31, 122, 255, .18);
}

.dashboard-bar-item small {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 800;
}

.dashboard-donut {
  position: relative;
  display: grid;
  place-items: center;
  width: 168px;
  height: 168px;
  margin: .25rem auto 1.15rem;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 18px 35px rgba(15, 23, 42, .08);
}

.dashboard-donut::before {
  content: "";
  position: absolute;
  z-index: 2;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, .8);
}

.dashboard-donut > div {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  text-align: center;
}

.dashboard-donut strong {
  color: #08142c;
  font-size: 1.65rem;
  line-height: 1;
}

.dashboard-donut span {
  margin-top: .35rem;
  color: #1f3b62;
  font-size: .82rem;
  font-weight: 700;
}

.dashboard-donut-blue {
  background: conic-gradient(#2f7cff 0 78%, #8b5cf6 78% 92%, #ff8a4c 92% 100%);
}

.dashboard-donut {
  position: relative;
}

.dashboard-donut-svg {
  background: transparent;
}

.dashboard-donut-chart {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
}

.dashboard-donut-track,
.dashboard-donut-segment {
  fill: none;
  stroke-width: 16;
}

.dashboard-donut-track {
  stroke: #e2e8f0;
}

.dashboard-donut-segment {
  stroke-linecap: butt;
  transition: stroke-dasharray .25s ease;
}

.dashboard-donut-svg::before {
  z-index: 1;
}

.dashboard-donut-svg > div {
  z-index: 2;
}


.dashboard-donut-clients {
  background: conic-gradient(#2f7cff 0 82%, #61b6e8 82% 100%);
}

.dashboard-stat-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 0;
  border-top: 1px solid rgba(226, 232, 240, .9);
}

.dashboard-stat-row strong {
  color: #0647c9;
  font-size: 1.05rem;
}

.dashboard-action-list,
.dashboard-appointment-list,
.dashboard-legend {
  display: grid;
  gap: .75rem;
}

.dashboard-action-list a,
.dashboard-appointment {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .75rem;
  width: 100%;
  padding: .85rem;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 16px;
  background: #fff;
  color: var(--dark);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.dashboard-action-list a:hover,
.dashboard-appointment:hover {
  transform: translateY(-1px);
  border-color: rgba(23, 63, 150, .18);
  box-shadow: 0 10px 22px rgba(15, 23, 42, .06);
  text-decoration: none;
}

.dashboard-action-list strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(255, 138, 31, .14);
  color: #b45309;
}

.dashboard-action-list span,
.dashboard-action-list em {
  font-weight: 800;
}

.dashboard-action-list em {
  color: var(--muted);
  font-style: normal;
}

.dashboard-legend div {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .65rem;
  color: #1f3b62;
  font-size: .9rem;
  font-weight: 700;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2f7cff;
}

.legend-dot-2 { background: #8b5cf6; }
.legend-dot-3 { background: #61b6e8; }
.legend-dot-4 { background: #ffc46b; }

.dashboard-appointment {
  grid-template-columns: auto 1fr;
  text-align: left;
  cursor: pointer;
}

.dashboard-appointment span {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 42px;
  padding: .45rem .55rem;
  border-radius: 14px;
  background: rgba(47, 124, 255, .12);
  color: #0647c9;
  font-weight: 900;
}

.dashboard-appointment strong,
.dashboard-appointment small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-appointment small {
  color: var(--muted);
  font-weight: 700;
}

.dashboard-appointment strong {
  font-size: 1.02rem;
  font-weight: 800;
  color: #08142c;
  line-height: 1.25;
}

.dashboard-appointment small {
  font-size: .88rem;
  color: var(--muted);
  font-weight: 700;
}

.dashboard-empty {
  margin: 0;
  padding: 1rem;
  border: 1px dashed rgba(148, 163, 184, .55);
  border-radius: 16px;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.dashboard-mini-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 1rem;
}

.dashboard-mini-card {
  min-height: 138px;
  padding: 1.15rem;
}

.dashboard-mini-card strong {
  display: block;
  margin-top: .7rem;
  color: #08142c;
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  line-height: 1.05;
}

@media (max-width: 1180px) {
  .dashboard-kpi-grid,
  .dashboard-main-grid,
  .dashboard-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .admin-dashboard-v2 .container {
    width: min(calc(100% - 1rem), 100%);
  }
  
  .dashboard-hero {
    align-items: stretch;
  }
  
  .dashboard-hero-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }
  
  .dashboard-hero-actions .admin-toast {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
  
  .dashboard-period-form {
    width: 100%;
    flex-wrap: wrap;
  }
  
  .dashboard-period-pill {
    flex: 1 1 180px;
    width: auto;
  }
  
  .dashboard-period-today {
    flex: 0 0 auto;
  }
  
  .dashboard-kpi-grid,
  .dashboard-main-grid,
  .dashboard-mini-grid,
  .dashboard-money-grid {
    grid-template-columns: 1fr;
  }
  
  .dashboard-kpi-card,
  .dashboard-panel,
  .dashboard-mini-card {
    border-radius: 20px;
  }
  
  .dashboard-bar-chart {
    gap: .45rem;
    overflow-x: auto;
  }
  
  .dashboard-bar-item {
    min-width: 42px;
  }
}


/* Hauteurs dynamiques du graphique dashboard (compatibles CSP). */
.dashboard-bar-h-0 { --bar-height: 0%; }
.dashboard-bar-h-1 { --bar-height: 1%; }
.dashboard-bar-h-2 { --bar-height: 2%; }
.dashboard-bar-h-3 { --bar-height: 3%; }
.dashboard-bar-h-4 { --bar-height: 4%; }
.dashboard-bar-h-5 { --bar-height: 5%; }
.dashboard-bar-h-6 { --bar-height: 6%; }
.dashboard-bar-h-7 { --bar-height: 7%; }
.dashboard-bar-h-8 { --bar-height: 8%; }
.dashboard-bar-h-9 { --bar-height: 9%; }
.dashboard-bar-h-10 { --bar-height: 10%; }
.dashboard-bar-h-11 { --bar-height: 11%; }
.dashboard-bar-h-12 { --bar-height: 12%; }
.dashboard-bar-h-13 { --bar-height: 13%; }
.dashboard-bar-h-14 { --bar-height: 14%; }
.dashboard-bar-h-15 { --bar-height: 15%; }
.dashboard-bar-h-16 { --bar-height: 16%; }
.dashboard-bar-h-17 { --bar-height: 17%; }
.dashboard-bar-h-18 { --bar-height: 18%; }
.dashboard-bar-h-19 { --bar-height: 19%; }
.dashboard-bar-h-20 { --bar-height: 20%; }
.dashboard-bar-h-21 { --bar-height: 21%; }
.dashboard-bar-h-22 { --bar-height: 22%; }
.dashboard-bar-h-23 { --bar-height: 23%; }
.dashboard-bar-h-24 { --bar-height: 24%; }
.dashboard-bar-h-25 { --bar-height: 25%; }
.dashboard-bar-h-26 { --bar-height: 26%; }
.dashboard-bar-h-27 { --bar-height: 27%; }
.dashboard-bar-h-28 { --bar-height: 28%; }
.dashboard-bar-h-29 { --bar-height: 29%; }
.dashboard-bar-h-30 { --bar-height: 30%; }
.dashboard-bar-h-31 { --bar-height: 31%; }
.dashboard-bar-h-32 { --bar-height: 32%; }
.dashboard-bar-h-33 { --bar-height: 33%; }
.dashboard-bar-h-34 { --bar-height: 34%; }
.dashboard-bar-h-35 { --bar-height: 35%; }
.dashboard-bar-h-36 { --bar-height: 36%; }
.dashboard-bar-h-37 { --bar-height: 37%; }
.dashboard-bar-h-38 { --bar-height: 38%; }
.dashboard-bar-h-39 { --bar-height: 39%; }
.dashboard-bar-h-40 { --bar-height: 40%; }
.dashboard-bar-h-41 { --bar-height: 41%; }
.dashboard-bar-h-42 { --bar-height: 42%; }
.dashboard-bar-h-43 { --bar-height: 43%; }
.dashboard-bar-h-44 { --bar-height: 44%; }
.dashboard-bar-h-45 { --bar-height: 45%; }
.dashboard-bar-h-46 { --bar-height: 46%; }
.dashboard-bar-h-47 { --bar-height: 47%; }
.dashboard-bar-h-48 { --bar-height: 48%; }
.dashboard-bar-h-49 { --bar-height: 49%; }
.dashboard-bar-h-50 { --bar-height: 50%; }
.dashboard-bar-h-51 { --bar-height: 51%; }
.dashboard-bar-h-52 { --bar-height: 52%; }
.dashboard-bar-h-53 { --bar-height: 53%; }
.dashboard-bar-h-54 { --bar-height: 54%; }
.dashboard-bar-h-55 { --bar-height: 55%; }
.dashboard-bar-h-56 { --bar-height: 56%; }
.dashboard-bar-h-57 { --bar-height: 57%; }
.dashboard-bar-h-58 { --bar-height: 58%; }
.dashboard-bar-h-59 { --bar-height: 59%; }
.dashboard-bar-h-60 { --bar-height: 60%; }
.dashboard-bar-h-61 { --bar-height: 61%; }
.dashboard-bar-h-62 { --bar-height: 62%; }
.dashboard-bar-h-63 { --bar-height: 63%; }
.dashboard-bar-h-64 { --bar-height: 64%; }
.dashboard-bar-h-65 { --bar-height: 65%; }
.dashboard-bar-h-66 { --bar-height: 66%; }
.dashboard-bar-h-67 { --bar-height: 67%; }
.dashboard-bar-h-68 { --bar-height: 68%; }
.dashboard-bar-h-69 { --bar-height: 69%; }
.dashboard-bar-h-70 { --bar-height: 70%; }
.dashboard-bar-h-71 { --bar-height: 71%; }
.dashboard-bar-h-72 { --bar-height: 72%; }
.dashboard-bar-h-73 { --bar-height: 73%; }
.dashboard-bar-h-74 { --bar-height: 74%; }
.dashboard-bar-h-75 { --bar-height: 75%; }
.dashboard-bar-h-76 { --bar-height: 76%; }
.dashboard-bar-h-77 { --bar-height: 77%; }
.dashboard-bar-h-78 { --bar-height: 78%; }
.dashboard-bar-h-79 { --bar-height: 79%; }
.dashboard-bar-h-80 { --bar-height: 80%; }
.dashboard-bar-h-81 { --bar-height: 81%; }
.dashboard-bar-h-82 { --bar-height: 82%; }
.dashboard-bar-h-83 { --bar-height: 83%; }
.dashboard-bar-h-84 { --bar-height: 84%; }
.dashboard-bar-h-85 { --bar-height: 85%; }
.dashboard-bar-h-86 { --bar-height: 86%; }
.dashboard-bar-h-87 { --bar-height: 87%; }
.dashboard-bar-h-88 { --bar-height: 88%; }
.dashboard-bar-h-89 { --bar-height: 89%; }
.dashboard-bar-h-90 { --bar-height: 90%; }
.dashboard-bar-h-91 { --bar-height: 91%; }
.dashboard-bar-h-92 { --bar-height: 92%; }
.dashboard-bar-h-93 { --bar-height: 93%; }
.dashboard-bar-h-94 { --bar-height: 94%; }
.dashboard-bar-h-95 { --bar-height: 95%; }
.dashboard-bar-h-96 { --bar-height: 96%; }
.dashboard-bar-h-97 { --bar-height: 97%; }
.dashboard-bar-h-98 { --bar-height: 98%; }
.dashboard-bar-h-99 { --bar-height: 99%; }
.dashboard-bar-h-100 { --bar-height: 100%; }

/* =======================================================================
ADMIN — dashboard : actions hero, période et menu
======================================================================= */

.dashboard-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .75rem;
  flex: 0 0 auto;
  min-width: 0;
  margin-left: auto;
}

.dashboard-hero-actions .admin-toast {
  order: 1;
}

.dashboard-hero-actions .dashboard-period-form {
  order: 2;
}

.dashboard-hero-actions .admin-header-actions {
  order: 3;
  display: flex;
  align-items: center;
  margin-left: 0;
}

.dashboard-hero-actions .admin-apple-menu {
  margin: 0;
}

/* Admin — file des demandes entrantes */
.incoming-stats-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:1rem;
  margin:0 0 1.5rem;
}
.incoming-stat-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:24px;
  padding:1.2rem 1.35rem;
  box-shadow:0 18px 45px rgba(15,23,42,.06);
}
.incoming-stat-card span{
  display:block;
  color:var(--muted);
  font-weight:800;
  margin-bottom:.35rem;
}
.incoming-stat-card strong{
  color:var(--dark);
  font-size:2rem;
  line-height:1;
}
.incoming-toolbar{
  align-items:end;
}
.incoming-request-list{
  display:grid;
  gap:1.15rem;
}
.incoming-request-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(280px,360px);
  gap:1.25rem;
  background:#fff;
  border:1px solid var(--line);
  border-radius:28px;
  padding:1.35rem;
  box-shadow:0 18px 45px rgba(15,23,42,.06);
}
.incoming-request-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:1rem;
  margin-bottom:1rem;
}
.incoming-request-head h2{
  margin:.2rem 0 .15rem;
  font-size:1.35rem;
}
.incoming-request-date{
  margin:0;
  color:var(--green);
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  font-size:.90rem;
}
.incoming-request-badges{
  justify-content:flex-end;
}
.incoming-request-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:1rem;
  margin-bottom:1rem;
}
.incoming-request-grid strong,
.incoming-linked-box strong,
.incoming-duplicates strong{
  display:block;
  color:var(--dark);
  font-weight:900;
  margin-bottom:.35rem;
}
.incoming-request-grid p{
  margin:0;
  color:var(--text);
  line-height:1.55;
}
.incoming-request-description{
  background:var(--soft);
  border:1px solid var(--line);
  border-radius:18px;
  padding:1rem;
  color:var(--text);
  line-height:1.6;
}
.incoming-request-side{
  display:flex;
  flex-direction:column;
  gap:1rem;
}
.incoming-linked-box,
.incoming-duplicates{
  background:var(--soft);
  border:1px solid var(--line);
  border-radius:18px;
  padding:1rem;
}
.incoming-linked-box a{
  font-weight:900;
}
.incoming-inline-form{
  margin:.55rem 0 0;
}
.incoming-duplicate-button{
  width:100%;
  border:1px solid rgba(23,63,150,.16);
  background:#fff;
  border-radius:16px;
  padding:.75rem .85rem;
  text-align:left;
  color:var(--dark);
  cursor:pointer;
}
.incoming-duplicate-button:hover{
  border-color:rgba(23,63,150,.34);
  box-shadow:0 10px 24px rgba(15,23,42,.08);
}
.incoming-duplicate-button span,
.incoming-duplicate-button small{
  display:block;
}
.incoming-duplicate-button span{
  font-weight:900;
}
.incoming-duplicate-button small{
  color:var(--muted);
  margin-top:.15rem;
}
.incoming-actions{
  display:flex;
  flex-direction:column;
  gap:.8rem;
}
.incoming-actions form{
  margin:0;
}
.incoming-actions .btn{
  width:100%;
  min-height:42px;
  padding:.7rem 1rem;
  border-radius:18px;
  box-shadow:none;
  font-size:.95rem;
  line-height:1.15;
}
.incoming-actions .btn-primary{
  border-color:rgba(23,63,150,.18);
}
.incoming-actions .btn-secondary{
  border-color:rgba(23,63,150,.16);
  background:#fff;
}
.incoming-actions .btn-danger{
  border-color:rgba(220,38,38,.22);
  background:rgba(220,38,38,.08);
  color:#a51f1f;
}
.incoming-actions .btn-danger:not(:disabled):hover,
.incoming-actions .btn-danger:not(:disabled):focus-visible{
  border-color:rgba(220,38,38,.36);
  background:rgba(220,38,38,.12);
  color:#8f1515;
}
.incoming-select-form{
  display:grid;
  gap:.6rem;
}
.incoming-select-form label{
  margin:0;
}
.welcome-voucher-reactivate-form{
  display:flex;
  justify-content:center;
  margin:1rem 0 0;
}

@media (max-width: 980px){
  .incoming-stats-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .incoming-request-card{
    grid-template-columns:1fr;
  }
}

@media (max-width: 640px){
  .incoming-stats-grid,
  .incoming-request-grid{
    grid-template-columns:1fr;
  }
  .incoming-request-card{
    padding:1rem;
    border-radius:22px;
  }
  .incoming-request-head{
    flex-direction:column;
  }
  .incoming-request-badges{
    justify-content:flex-start;
  }
}

.dashboard-period-form {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: .65rem;
  flex: 0 0 auto;
  margin-left: auto;
}

.dashboard-period-form .dashboard-period-nav,
.dashboard-period-form .dashboard-period-pill {
  align-self: center;
  margin: 0;
}

.dashboard-period-form .dashboard-period-nav {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
}

.dashboard-period-form .dashboard-period-pill {
  flex: 0 0 auto;
  min-width: 190px;
  height: 48px;
  min-height: 48px;
  padding: 0 1.25rem;
}

@media (max-width: 720px) {
  .dashboard-hero-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }
  
  .dashboard-hero-actions .dashboard-period-form,
  .dashboard-hero-actions .admin-header-actions,
  .dashboard-hero-actions .admin-toast {
    width: 100%;
  }
  
  .dashboard-period-form {
    justify-content: space-between;
    flex-wrap: nowrap;
    margin-left: 0;
  }
  
  .dashboard-period-form .dashboard-period-pill {
    flex: 1 1 auto;
    min-width: 0;
  }
  
  .dashboard-period-form .dashboard-period-nav {
    flex: 0 0 48px;
  }
  
  .dashboard-hero-actions .admin-header-actions {
    justify-content: flex-end;
  }
  
  .dashboard-hero-actions .admin-toast {
    min-width: 0;
    max-width: none;
  }
}



/* ==========================================================================
ADMIN — dashboard période centrée entre les flèches
========================================================================== */

.dashboard-period-form {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
}

.dashboard-period-form .dashboard-period-nav,
.dashboard-period-form .dashboard-period-pill {
  align-self: center;
  margin: 0;
}

.dashboard-period-form .dashboard-period-nav {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
}

.dashboard-period-form .dashboard-period-pill {
  flex: 0 0 auto;
  min-width: 150px;
  height: 48px;
  min-height: 48px;
  padding: 0 1.15rem;
}

@media (max-width: 720px) {
  .dashboard-period-form {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: space-between;
  }
  
  .dashboard-period-form .dashboard-period-pill {
    flex: 1 1 auto;
    min-width: 0;
  }
  
  .dashboard-period-form .dashboard-period-nav {
    flex: 0 0 48px;
  }
}

/* ==========================================================================
ADMIN — dashboard regroupé par portée des indicateurs
========================================================================== */

.dashboard-section {
  margin-top: 1.2rem;
}

.dashboard-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 .85rem;
}

.dashboard-section-head .eyebrow {
  margin-bottom: .3rem;
}

.dashboard-section-head h2 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

.dashboard-section-head > span {
  max-width: 420px;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: right;
}

.dashboard-section-head .dashboard-period-form {
  margin-left: auto;
}

.dashboard-section-head .dashboard-period-pill {
  min-width: 190px;
}

.dashboard-operational-grid,
.dashboard-period-kpi-grid,
.dashboard-period-grid,
.dashboard-global-grid {
  display: grid;
  gap: 1rem;
}

.dashboard-operational-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.dashboard-operational-grid .dashboard-priority-panel,
.dashboard-operational-grid .dashboard-upcoming-panel {
  grid-column: span 3;
  min-height: auto;
}

.dashboard-operational-grid .dashboard-action-list,
.dashboard-operational-grid .dashboard-appointment-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-period-kpi-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.dashboard-period-grid {
  grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, 1fr));
}

.dashboard-period-mini-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-global-grid {
  grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, .85fr));
  align-items: stretch;
}

.dashboard-global-grid .dashboard-panel,
.dashboard-global-grid .dashboard-mini-card {
  min-height: 220px;
}

.dashboard-top-device-card strong {
  overflow-wrap: anywhere;
}

.dashboard-top-device-list {
  display: grid;
  gap: .65rem;
  margin: .85rem 0 0;
  padding: 0;
  list-style: none;
}

.dashboard-top-device-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem;
  padding: .65rem .75rem;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 16px;
  background: rgba(248, 250, 252, .72);
}

.dashboard-top-device-list li > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(23, 63, 150, .08);
  color: var(--blue);
  font-size: .82rem;
  font-weight: 900;
}

.dashboard-top-device-list strong {
  margin: 0;
  overflow: hidden;
  color: #08142c;
  font-size: .98rem;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-top-device-list small {
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .dashboard-top-device-list li {
    grid-template-columns: 34px minmax(0, 1fr);
  }
  
  .dashboard-top-device-list small {
    grid-column: 2;
  }
}

@media (max-width: 1180px) {
  .dashboard-period-grid,
  .dashboard-global-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .dashboard-operational-grid .dashboard-action-list,
  .dashboard-operational-grid .dashboard-appointment-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .dashboard-section-head {
    align-items: flex-start;
    flex-direction: column;
  }
  
  .dashboard-section-head > span {
    max-width: none;
    text-align: left;
  }
  
  .dashboard-operational-grid,
  .dashboard-period-kpi-grid,
  .dashboard-period-grid,
  .dashboard-period-mini-grid,
  .dashboard-global-grid {
    grid-template-columns: 1fr;
  }
  
  .dashboard-operational-grid .dashboard-priority-panel,
  .dashboard-operational-grid .dashboard-upcoming-panel {
    grid-column: auto;
  }
}


/* ==========================================================================
DASHBOARD — statistiques techniques & clients
========================================================================== */

.dashboard-insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.dashboard-insight-card,
.dashboard-resolution-card {
  min-height: 0;
}

.dashboard-ranked-list {
  display: grid;
  gap: .75rem;
}

.dashboard-ranked-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
  padding: .8rem;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 16px;
  background: #fff;
}

.dashboard-ranked-row > div {
  min-width: 0;
}

.dashboard-ranked-row strong {
  display: block;
  overflow: hidden;
  color: #08142c;
  font-size: .95rem;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-ranked-row small {
  display: block;
  margin-top: .15rem;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
}

.dashboard-ranked-row em {
  color: #1f3b62;
  font-style: normal;
  font-weight: 900;
}

.dashboard-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: rgba(47, 124, 255, .12);
  color: #0647c9;
  font-size: .9rem;
  font-weight: 900;
}

.dashboard-progress-track {
  display: block;
  width: 100%;
  height: 8px;
  margin-top: .45rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.dashboard-progress-value {
  display: block;
  width: var(--bar-height);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f7cff, #8b5cf6);
}

.dashboard-progress-value-green {
  background: linear-gradient(90deg, #74bf2a, #22c55e);
}

.dashboard-score-ring {
  display: grid;
  place-items: center;
  width: 168px;
  height: 168px;
  margin: .25rem auto 1rem;
  border-radius: 999px;
  background:
  radial-gradient(circle, #fff 0 55%, transparent 56%),
  conic-gradient(#2f7cff 0 75%, #e2e8f0 75% 100%);
  text-align: center;
}

.dashboard-score-ring-green {
  background:
  radial-gradient(circle, #fff 0 55%, transparent 56%),
  conic-gradient(#74bf2a 0 75%, #e2e8f0 75% 100%);
}

.dashboard-score-ring strong {
  color: #08142c;
  font-size: 2rem;
  line-height: 1;
}

.dashboard-score-ring span {
  max-width: 88px;
  color: #1f3b62;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.dashboard-card-note {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

@media (max-width: 1180px) {
  .dashboard-insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .dashboard-insight-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
DASHBOARD — période sélectionnée compacte
========================================================================== */

.dashboard-period-grid-compact {
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  align-items: stretch;
}

.dashboard-period-grid-compact .dashboard-panel {
  min-height: auto;
}

/*
* Si la section période contient uniquement la carte "Interventions par type"
* et que les mini-cartes suivent juste après, elles restent compactes et visuellement
* alignées à droite lorsque l'écran le permet.
*/
.dashboard-period-mini-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 640px;
}

.dashboard-period-mini-grid .dashboard-mini-card {
  min-height: 132px;
}

@media (min-width: 1181px) {
  .dashboard-section-period {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, .72fr);
    gap: 1rem;
    align-items: start;
  }
  
  .dashboard-section-period > .dashboard-section-head {
    grid-column: 1 / -1;
  }
  
  .dashboard-section-period > .dashboard-period-kpi-grid {
    grid-column: 1 / -1;
  }
  
  .dashboard-section-period > .dashboard-period-grid {
    grid-column: 1 / 2;
    margin: 0;
  }
  
  .dashboard-section-period > .dashboard-period-mini-grid {
    grid-column: 2 / 3;
    margin-top: 0;
    max-width: none;
    align-self: stretch;
    grid-template-columns: 1fr;
  }
  
  .dashboard-section-period > .dashboard-period-mini-grid .dashboard-mini-card {
    min-height: 50%;
  }
}

@media (max-width: 1180px) {
  .dashboard-period-grid-compact,
  .dashboard-period-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }
}

@media (max-width: 720px) {
  .dashboard-period-grid-compact,
  .dashboard-period-mini-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
DASHBOARD — cartes statistiques techniques et clients
========================================================================== */

.dashboard-section-technical,
.dashboard-section-clients {
  margin-top: 1.25rem;
}

.dashboard-insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.dashboard-insight-card,
.dashboard-resolution-card {
  min-height: 0;
}

.dashboard-ranked-list {
  display: grid;
  gap: .75rem;
}

.dashboard-ranked-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
  padding: .8rem;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 16px;
  background: #fff;
}

.dashboard-ranked-row > div {
  min-width: 0;
}

.dashboard-ranked-row strong {
  display: block;
  overflow: hidden;
  color: #08142c;
  font-size: .95rem;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-ranked-row small {
  display: block;
  margin-top: .15rem;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
}

.dashboard-ranked-row em {
  color: #1f3b62;
  font-style: normal;
  font-weight: 900;
}

.dashboard-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: rgba(47, 124, 255, .12);
  color: #0647c9;
  font-size: .9rem;
  font-weight: 900;
}

.dashboard-progress-track {
  display: block;
  width: 100%;
  height: 8px;
  margin-top: .45rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.dashboard-progress-value {
  display: block;
  width: var(--bar-height);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f7cff, #8b5cf6);
}

.dashboard-progress-value-green {
  background: linear-gradient(90deg, #74bf2a, #22c55e);
}

.dashboard-score-ring {
  display: grid;
  place-items: center;
  width: 168px;
  height: 168px;
  margin: .25rem auto 1rem;
  border-radius: 999px;
  background:
  radial-gradient(circle, #fff 0 55%, transparent 56%),
  conic-gradient(#2f7cff 0 75%, #e2e8f0 75% 100%);
  text-align: center;
}

.dashboard-score-ring-green {
  background:
  radial-gradient(circle, #fff 0 55%, transparent 56%),
  conic-gradient(#74bf2a 0 75%, #e2e8f0 75% 100%);
}

.dashboard-score-ring strong {
  color: #08142c;
  font-size: 2rem;
  line-height: 1;
}

.dashboard-score-ring span {
  max-width: 92px;
  color: #1f3b62;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.dashboard-card-note {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

@media (max-width: 1180px) {
  .dashboard-insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .dashboard-insight-grid {
    grid-template-columns: 1fr;
  }
}


/* Correctif affichage score-ring dashboard */
.dashboard-score-ring {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: column !important;
  gap: .35rem !important;
}

.dashboard-score-ring strong {
  display: block !important;
  position: relative !important;
  z-index: 2 !important;
}

.dashboard-score-ring span {
  display: block !important;
  position: relative !important;
  z-index: 2 !important;
}


/* ==========================================================================
DASHBOARD — période sélectionnée : rendez-vous, KPI et évolution annuelle
========================================================================== */

.dashboard-kpi-purple .dashboard-kpi-icon {
  background: linear-gradient(135deg, #7c3aed, #c4b5fd);
}

.dashboard-section-period > .dashboard-period-kpi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-period-grid {
  grid-template-columns: minmax(360px, .72fr) minmax(0, 1.28fr);
  align-items: stretch;
}

.dashboard-period-grid .dashboard-yearly-panel {
  min-height: auto;
}

.dashboard-yearly-panel {
  overflow: hidden;
}

.dashboard-yearly-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem 1rem;
  margin: -.35rem 0 1rem;
  color: #1f3b62;
  font-size: .82rem;
  font-weight: 800;
}

.dashboard-yearly-legend span {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.dashboard-yearly-legend i {
  width: .65rem;
  height: .65rem;
  border-radius: 999px;
}

.dashboard-yearly-legend .is-created,
.dashboard-yearly-bar.is-created {
  background: #2f7cff;
}

.dashboard-yearly-legend .is-billable,
.dashboard-yearly-bar.is-billable {
  background: #74bf2a;
}

.dashboard-yearly-legend .is-blocked,
.dashboard-yearly-bar.is-blocked {
  background: #f59e0b;
}

.dashboard-yearly-chart {
  display: grid;
  grid-template-columns: repeat(12, minmax(34px, 1fr));
  gap: .45rem;
  align-items: end;
  min-height: 230px;
  padding: .5rem .15rem 0;
  overflow-x: auto;
}

.dashboard-yearly-month {
  display: grid;
  align-items: end;
  gap: .45rem;
  min-width: 34px;
  height: 100%;
  padding: .35rem .2rem;
  border-radius: 14px;
}

.dashboard-yearly-month.is-selected {
  background: rgba(23, 63, 150, .08);
  box-shadow: inset 0 0 0 1px rgba(23, 63, 150, .12);
}

.dashboard-yearly-bars {
  display: flex;
  justify-content: center;
  align-items: end;
  gap: .18rem;
  height: 180px;
}

.dashboard-yearly-bar {
  display: block;
  width: .48rem;
  height: var(--bar-height);
  min-height: 4px;
  border-radius: 999px 999px 6px 6px;
  opacity: .72;
}

.dashboard-yearly-month.is-selected .dashboard-yearly-bar {
  opacity: 1;
  width: .58rem;
}

.dashboard-yearly-month small {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 900;
  text-align: center;
}

.dashboard-yearly-month.is-selected small {
  color: var(--blue);
}

.dashboard-appointment.is-soon span {
  background: rgba(116, 191, 42, .14);
  color: #166534;
}

.dashboard-appointment.is-upcoming span {
  background: rgba(47, 124, 255, .12);
  color: #0647c9;
}

/* Anneaux dynamiques sans style inline : résolution / clients récurrents */
.dashboard-score-ring {
  --score-deg: 0deg;
  background:
  radial-gradient(circle, #fff 0 55%, transparent 56%),
  conic-gradient(#2f7cff 0 var(--score-deg), #e2e8f0 var(--score-deg) 100%) !important;
}

.dashboard-score-ring-green {
  background:
  radial-gradient(circle, #fff 0 55%, transparent 56%),
  conic-gradient(#74bf2a 0 var(--score-deg), #e2e8f0 var(--score-deg) 100%) !important;
}

.dashboard-score-p-0 { --score-deg: 0.0deg; }
.dashboard-score-p-1 { --score-deg: 3.6deg; }
.dashboard-score-p-2 { --score-deg: 7.2deg; }
.dashboard-score-p-3 { --score-deg: 10.8deg; }
.dashboard-score-p-4 { --score-deg: 14.4deg; }
.dashboard-score-p-5 { --score-deg: 18.0deg; }
.dashboard-score-p-6 { --score-deg: 21.6deg; }
.dashboard-score-p-7 { --score-deg: 25.2deg; }
.dashboard-score-p-8 { --score-deg: 28.8deg; }
.dashboard-score-p-9 { --score-deg: 32.4deg; }
.dashboard-score-p-10 { --score-deg: 36.0deg; }
.dashboard-score-p-11 { --score-deg: 39.6deg; }
.dashboard-score-p-12 { --score-deg: 43.2deg; }
.dashboard-score-p-13 { --score-deg: 46.8deg; }
.dashboard-score-p-14 { --score-deg: 50.4deg; }
.dashboard-score-p-15 { --score-deg: 54.0deg; }
.dashboard-score-p-16 { --score-deg: 57.6deg; }
.dashboard-score-p-17 { --score-deg: 61.2deg; }
.dashboard-score-p-18 { --score-deg: 64.8deg; }
.dashboard-score-p-19 { --score-deg: 68.4deg; }
.dashboard-score-p-20 { --score-deg: 72.0deg; }
.dashboard-score-p-21 { --score-deg: 75.6deg; }
.dashboard-score-p-22 { --score-deg: 79.2deg; }
.dashboard-score-p-23 { --score-deg: 82.8deg; }
.dashboard-score-p-24 { --score-deg: 86.4deg; }
.dashboard-score-p-25 { --score-deg: 90.0deg; }
.dashboard-score-p-26 { --score-deg: 93.6deg; }
.dashboard-score-p-27 { --score-deg: 97.2deg; }
.dashboard-score-p-28 { --score-deg: 100.8deg; }
.dashboard-score-p-29 { --score-deg: 104.4deg; }
.dashboard-score-p-30 { --score-deg: 108.0deg; }
.dashboard-score-p-31 { --score-deg: 111.6deg; }
.dashboard-score-p-32 { --score-deg: 115.2deg; }
.dashboard-score-p-33 { --score-deg: 118.8deg; }
.dashboard-score-p-34 { --score-deg: 122.4deg; }
.dashboard-score-p-35 { --score-deg: 126.0deg; }
.dashboard-score-p-36 { --score-deg: 129.6deg; }
.dashboard-score-p-37 { --score-deg: 133.2deg; }
.dashboard-score-p-38 { --score-deg: 136.8deg; }
.dashboard-score-p-39 { --score-deg: 140.4deg; }
.dashboard-score-p-40 { --score-deg: 144.0deg; }
.dashboard-score-p-41 { --score-deg: 147.6deg; }
.dashboard-score-p-42 { --score-deg: 151.2deg; }
.dashboard-score-p-43 { --score-deg: 154.8deg; }
.dashboard-score-p-44 { --score-deg: 158.4deg; }
.dashboard-score-p-45 { --score-deg: 162.0deg; }
.dashboard-score-p-46 { --score-deg: 165.6deg; }
.dashboard-score-p-47 { --score-deg: 169.2deg; }
.dashboard-score-p-48 { --score-deg: 172.8deg; }
.dashboard-score-p-49 { --score-deg: 176.4deg; }
.dashboard-score-p-50 { --score-deg: 180.0deg; }
.dashboard-score-p-51 { --score-deg: 183.6deg; }
.dashboard-score-p-52 { --score-deg: 187.2deg; }
.dashboard-score-p-53 { --score-deg: 190.8deg; }
.dashboard-score-p-54 { --score-deg: 194.4deg; }
.dashboard-score-p-55 { --score-deg: 198.0deg; }
.dashboard-score-p-56 { --score-deg: 201.6deg; }
.dashboard-score-p-57 { --score-deg: 205.2deg; }
.dashboard-score-p-58 { --score-deg: 208.8deg; }
.dashboard-score-p-59 { --score-deg: 212.4deg; }
.dashboard-score-p-60 { --score-deg: 216.0deg; }
.dashboard-score-p-61 { --score-deg: 219.6deg; }
.dashboard-score-p-62 { --score-deg: 223.2deg; }
.dashboard-score-p-63 { --score-deg: 226.8deg; }
.dashboard-score-p-64 { --score-deg: 230.4deg; }
.dashboard-score-p-65 { --score-deg: 234.0deg; }
.dashboard-score-p-66 { --score-deg: 237.6deg; }
.dashboard-score-p-67 { --score-deg: 241.2deg; }
.dashboard-score-p-68 { --score-deg: 244.8deg; }
.dashboard-score-p-69 { --score-deg: 248.4deg; }
.dashboard-score-p-70 { --score-deg: 252.0deg; }
.dashboard-score-p-71 { --score-deg: 255.6deg; }
.dashboard-score-p-72 { --score-deg: 259.2deg; }
.dashboard-score-p-73 { --score-deg: 262.8deg; }
.dashboard-score-p-74 { --score-deg: 266.4deg; }
.dashboard-score-p-75 { --score-deg: 270.0deg; }
.dashboard-score-p-76 { --score-deg: 273.6deg; }
.dashboard-score-p-77 { --score-deg: 277.2deg; }
.dashboard-score-p-78 { --score-deg: 280.8deg; }
.dashboard-score-p-79 { --score-deg: 284.4deg; }
.dashboard-score-p-80 { --score-deg: 288.0deg; }
.dashboard-score-p-81 { --score-deg: 291.6deg; }
.dashboard-score-p-82 { --score-deg: 295.2deg; }
.dashboard-score-p-83 { --score-deg: 298.8deg; }
.dashboard-score-p-84 { --score-deg: 302.4deg; }
.dashboard-score-p-85 { --score-deg: 306.0deg; }
.dashboard-score-p-86 { --score-deg: 309.6deg; }
.dashboard-score-p-87 { --score-deg: 313.2deg; }
.dashboard-score-p-88 { --score-deg: 316.8deg; }
.dashboard-score-p-89 { --score-deg: 320.4deg; }
.dashboard-score-p-90 { --score-deg: 324.0deg; }
.dashboard-score-p-91 { --score-deg: 327.6deg; }
.dashboard-score-p-92 { --score-deg: 331.2deg; }
.dashboard-score-p-93 { --score-deg: 334.8deg; }
.dashboard-score-p-94 { --score-deg: 338.4deg; }
.dashboard-score-p-95 { --score-deg: 342.0deg; }
.dashboard-score-p-96 { --score-deg: 345.6deg; }
.dashboard-score-p-97 { --score-deg: 349.2deg; }
.dashboard-score-p-98 { --score-deg: 352.8deg; }
.dashboard-score-p-99 { --score-deg: 356.4deg; }
.dashboard-score-p-100 { --score-deg: 360.0deg; }

@media (max-width: 1180px) {
  .dashboard-section-period > .dashboard-period-kpi-grid,
  .dashboard-period-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .dashboard-yearly-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .dashboard-section-period > .dashboard-period-kpi-grid,
  .dashboard-period-grid {
    grid-template-columns: 1fr;
  }
  
  .dashboard-yearly-chart {
    grid-template-columns: repeat(12, 42px);
  }
}


/* ==========================================================================
DASHBOARD — ajustements période sélectionnée v2
========================================================================== */

.dashboard-kpi-dark .dashboard-kpi-icon {
  background: linear-gradient(135deg, #0f172a, #64748b);
}

.dashboard-section-period > .dashboard-period-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-period-grid {
  grid-template-columns: minmax(320px, .58fr) minmax(0, 1.42fr);
  align-items: stretch;
}

.dashboard-yearly-panel {
  width: 100%;
}

.dashboard-yearly-chart {
  grid-template-columns: repeat(12, minmax(46px, 1fr));
  gap: .55rem;
  min-height: 270px;
}

.dashboard-yearly-month {
  position: relative;
  min-width: 46px;
  min-height: 238px;
  padding: .65rem .35rem .45rem;
  align-content: end;
}

.dashboard-yearly-month.is-selected {
  background: rgba(23, 63, 150, .10);
  box-shadow:
  inset 0 0 0 1px rgba(23, 63, 150, .18),
  0 10px 22px rgba(15, 23, 42, .05);
}

.dashboard-yearly-month.is-selected::before {
  content: "";
  position: absolute;
  inset: .35rem .18rem 1.75rem;
  border-radius: 12px;
  background: rgba(23, 63, 150, .055);
  pointer-events: none;
}

.dashboard-yearly-bars {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 200px;
  padding: 0 .1rem;
}

.dashboard-yearly-bar {
  width: .56rem;
}

.dashboard-yearly-month.is-selected .dashboard-yearly-bar {
  width: .68rem;
}

.dashboard-yearly-month small {
  position: relative;
  z-index: 1;
}

@media (max-width: 1180px) {
  .dashboard-section-period > .dashboard-period-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .dashboard-period-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .dashboard-section-period > .dashboard-period-kpi-grid {
    grid-template-columns: 1fr;
  }
  
  .dashboard-yearly-chart {
    grid-template-columns: repeat(12, 48px);
  }
}


/* ==========================================================================
DASHBOARD — évolution annuelle pleine largeur
========================================================================== */

.dashboard-section-period > .dashboard-period-grid {
  grid-template-columns: minmax(330px, .52fr) minmax(0, 1.48fr) !important;
  width: 100%;
}

.dashboard-section-period .dashboard-yearly-panel {
  width: 100%;
  min-width: 0;
}

.dashboard-section-period .dashboard-yearly-chart {
  grid-template-columns: repeat(12, minmax(54px, 1fr));
  width: 100%;
}

.dashboard-section-period .dashboard-yearly-month {
  width: 100%;
}

.dashboard-section-period .dashboard-yearly-bars {
  width: 100%;
}

@media (max-width: 1180px) {
  .dashboard-section-period > .dashboard-period-grid {
    grid-template-columns: 1fr !important;
  }
}


/* ==========================================================================
DASHBOARD — évolution annuelle pleine zone restante
========================================================================== */

/*
* La règle précédente plaçait dashboard-period-grid dans une seule colonne
* du parent .dashboard-section-period. Résultat : "Évolution annuelle"
* ne pouvait pas occuper l’espace disponible à droite.
*
* Ici, on force la grille "Interventions par type + Évolution annuelle"
* à reprendre toute la largeur de la section période.
*/
@media (min-width: 1181px) {
  .dashboard-section-period {
    display: grid;
    grid-template-columns: 1fr;
  }
  
  .dashboard-section-period > .dashboard-section-head,
  .dashboard-section-period > .dashboard-period-kpi-grid,
  .dashboard-section-period > .dashboard-period-grid,
  .dashboard-section-period > .dashboard-period-mini-grid {
    grid-column: 1 / -1;
  }
  
  .dashboard-section-period > .dashboard-period-grid {
    display: grid;
    grid-template-columns: minmax(330px, 0.36fr) minmax(0, 1fr) !important;
    width: 100%;
    max-width: none;
    align-items: stretch;
  }
  
  .dashboard-section-period .dashboard-yearly-panel {
    width: 100%;
    max-width: none;
    min-width: 0;
  }
  
  .dashboard-section-period .dashboard-yearly-chart {
    width: 100%;
    grid-template-columns: repeat(12, minmax(58px, 1fr));
  }
  
  .dashboard-section-period .dashboard-yearly-month {
    width: 100%;
    min-width: 58px;
  }
}

/* ==========================================================================
  BASE GLOBALE — proportions des cartes
  ========================================================================== */
  
.dashboard-global-grid{
  display:grid;
  grid-template-columns: 1.05fr 1.45fr .60fr;
  gap:1rem;
  align-items:stretch;
}

/* Répartition clients (rouge) */
.dashboard-global-grid .dashboard-card-clients{
  min-width:0;
}

/* Top 3 appareils (bleu) */
.dashboard-global-grid .dashboard-card-devices{
  min-width:0;
}

/* Dossiers clôturés (vert) */
.dashboard-global-grid .dashboard-card-closed{
  min-width:0;
}

/* Responsive tablette */
@media (max-width: 1180px){
  .dashboard-global-grid{
    grid-template-columns:1fr 1fr;
  }
  
  .dashboard-global-grid .dashboard-card-closed{
    grid-column:1 / -1;
  }
}

/* Responsive mobile */
@media (max-width: 720px){
  .dashboard-global-grid{
    grid-template-columns:1fr;
  }
  
  .dashboard-global-grid .dashboard-card-closed{
    grid-column:auto;
  }
}

/* ==========================================================================
   DASHBOARD — sélecteur Mensuel / Annuel et évolution détaillée
   ========================================================================== */

.dashboard-period-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .75rem;
    margin-left: auto;
    flex-wrap: wrap;
}

.dashboard-period-mode-switch {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .25rem;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 999px;
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .05);
}

.dashboard-period-mode-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: .55rem .9rem;
    border-radius: 999px;
    color: #1f3b62;
    font-size: .9rem;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
}

.dashboard-period-mode-switch a:hover {
    text-decoration: none;
}

.dashboard-period-mode-switch a.is-active {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 10px 22px rgba(23, 63, 150, .16);
}

.dashboard-section-period > .dashboard-period-grid {
    display: grid;
    grid-template-columns: 1fr !important;
    width: 100%;
    max-width: none;
    gap: 1rem;
}

.dashboard-section-period .dashboard-yearly-panel {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
}

.dashboard-yearly-legend .is-progress,
.dashboard-yearly-bar.is-progress {
    background: #2f7cff;
}

.dashboard-yearly-legend .is-invoiced,
.dashboard-yearly-bar.is-invoiced {
    background: #74bf2a;
}

.dashboard-yearly-legend .is-billing,
.dashboard-yearly-bar.is-billing {
    background: #22c55e;
}

.dashboard-yearly-legend .is-cancelled,
.dashboard-yearly-bar.is-cancelled {
    background: #ef4444;
}

.dashboard-yearly-legend .is-waiting-client,
.dashboard-yearly-bar.is-waiting-client {
    background: #f59e0b;
}

.dashboard-yearly-legend .is-waiting-supplier,
.dashboard-yearly-bar.is-waiting-supplier {
    background: #8b5cf6;
}

.dashboard-yearly-plot {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: .75rem;
    align-items: stretch;
    width: 100%;
}

.dashboard-yearly-y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 270px;
    padding: .55rem 0 2.05rem;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
    text-align: right;
}

.dashboard-yearly-chart {
    position: relative;
    width: 100%;
    min-height: 270px;
    padding: .65rem .15rem 0;
    border-left: 1px solid rgba(226, 232, 240, .95);
    border-bottom: 1px solid rgba(226, 232, 240, .95);
    background:
        linear-gradient(to bottom, rgba(226, 232, 240, .42) 1px, transparent 1px) 0 0 / 100% 50%,
        transparent;
}

.dashboard-yearly-bars {
    height: 210px;
    gap: .2rem;
}

.dashboard-yearly-bar {
    width: .42rem;
}

.dashboard-yearly-month.is-selected .dashboard-yearly-bar {
    width: .48rem;
}

.dashboard-yearly-axis-labels {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: .65rem;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
}

.dashboard-section-period .dashboard-yearly-chart {
    grid-template-columns: repeat(12, minmax(54px, 1fr));
}

.dashboard-section-period .dashboard-yearly-month {
    min-width: 54px;
}

.dashboard-section-period .dashboard-yearly-panel .dashboard-panel-header {
    align-items: flex-start;
}

@media (max-width: 1180px) {
    .dashboard-period-controls {
        width: 100%;
        justify-content: flex-start;
    }

    .dashboard-period-controls .dashboard-period-form {
        margin-left: 0;
    }

    .dashboard-section-period .dashboard-yearly-chart {
        grid-template-columns: repeat(12, 56px);
        overflow-x: auto;
    }
}

@media (max-width: 720px) {
    .dashboard-period-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-period-mode-switch,
    .dashboard-period-controls .dashboard-period-form {
        width: 100%;
    }

    .dashboard-period-mode-switch a {
        flex: 1 1 0;
    }

    .dashboard-yearly-plot {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: .55rem;
    }

    .dashboard-yearly-y-axis {
        min-height: 245px;
        font-size: .72rem;
    }

    .dashboard-yearly-chart {
        min-height: 245px;
    }

    .dashboard-yearly-bars {
        height: 188px;
    }
}

/* Le mode mensuel affiche jusqu'à 31 jours : on conserve une lecture horizontale propre. */
.dashboard-yearly-chart-month {
    grid-template-columns: repeat(31, minmax(72px, 1fr)) !important;
    gap: .55rem;
    overflow-x: auto;
}

.dashboard-yearly-chart-month .dashboard-yearly-month {
    width: auto;
    min-width: 72px;
    padding-right: .25rem;
    padding-left: .25rem;
}

.dashboard-yearly-chart-month .dashboard-yearly-bars {
    padding-right: 0;
    padding-left: 0;
}

.dashboard-yearly-chart-year {
    grid-template-columns: repeat(12, minmax(54px, 1fr)) !important;
}


/* ==========================================================================
   DASHBOARD — carte "Interventions par type" compacte
   ========================================================================== */

/*
 * Le graphique d'évolution reste sur toute la largeur disponible.
 * La carte "Interventions par type" repasse ensuite en dessous,
 * alignée à gauche, avec une largeur comparable aux cartes d'insights.
 */
.dashboard-section-period > .dashboard-period-grid > .dashboard-panel:not(.dashboard-yearly-panel) {
    width: 100%;
    max-width: 380px;
    justify-self: start;
}

@media (max-width: 720px) {
    .dashboard-section-period > .dashboard-period-grid > .dashboard-panel:not(.dashboard-yearly-panel) {
        max-width: none;
    }
}


/* ==========================================================================
   DASHBOARD — transition fluide des données période
   ========================================================================== */

#dashboardPeriodSection {
  transition: opacity .24s ease, transform .24s ease, filter .24s ease;
  will-change: opacity, transform;
}

#dashboardPeriodSection.is-loading {
  opacity: .42;
  transform: translateY(8px);
  filter: blur(.4px);
  pointer-events: none;
}

#dashboardPeriodSection.is-revealing {
  animation: dashboardPeriodReveal .24s ease both;
}

@keyframes dashboardPeriodReveal {
  from {
    opacity: .42;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   SONDAGE — page publique et statistiques admin
   ========================================================================== */

.survey-page {
  background: #f8fafc;
}

.survey-page p,
.survey-page li {
  text-align: left;
}

.survey-header .brand img {
  height: 99px;
}

.survey-hero {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid rgba(226, 232, 240, .9);
  background:
    linear-gradient(135deg, rgba(23, 63, 150, .08), rgba(116, 191, 42, .08)),
    #fff;
}

.survey-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 1.5rem;
  align-items: stretch;
}

.survey-hero-copy {
  align-self: center;
}

.survey-hero-copy h1 {
  max-width: 820px;
  margin: 0 0 1rem;
  color: var(--dark);
  font-family: "ErasClic", "Inter", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 4rem);
  line-height: 1.04;
}

.survey-hero-copy p:not(.eyebrow) {
  max-width: 720px;
  margin: 0;
  color: #334155;
  font-size: 1.08rem;
}

.survey-intent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.25rem;
}

.survey-privacy-panel,
.survey-unavailable,
.survey-thanks,
.survey-question,
.survey-alert {
  border: 1px solid rgba(226, 232, 240, .95);
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .07);
}

.survey-privacy-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 260px;
  padding: 1.3rem;
  border-radius: 22px;
}

.survey-privacy-panel strong {
  display: block;
  margin-bottom: .75rem;
  color: var(--blue);
  font-size: 1.1rem;
}

.survey-privacy-panel ul {
  margin: .65rem 0 0;
  padding: .95rem 1rem .95rem 2.1rem;
  border: 1px solid rgba(226, 232, 240, .85);
  border-radius: 18px;
  background: rgba(248, 250, 252, .72);
  color: #475569;
  font-weight: 650;
  line-height: 1.75;
  list-style: none;
}

.survey-privacy-panel li {
  position: relative;
  margin: .35rem 0;
  padding-left: 1.65rem;
}

.survey-privacy-panel li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .88em;
  width: .72rem;
  height: .72rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green), #9de06f);
  box-shadow: 0 0 0 5px rgba(116, 191, 42, .13);
  transform: translateY(-50%);
}

.survey-main-section {
  padding: 2rem 0 3rem;
}

.survey-form {
  display: grid;
  gap: 1rem;
  max-width: 1040px;
  margin: 0 auto;
}

.survey-question {
  padding: 1.25rem;
  border-radius: 22px;
}

.survey-question-head {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-bottom: 1rem;
}

.survey-question-head > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: rgba(23, 63, 150, .09);
  color: var(--blue);
  font-weight: 900;
}

.survey-question-head h2 {
  margin: 0;
  color: var(--dark);
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  line-height: 1.25;
}

.survey-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}

.survey-choice-grid-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.survey-choice-grid-wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.survey-choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: .7rem;
  min-height: 58px;
  margin: 0;
  padding: .8rem .9rem;
  border: 1px solid rgba(226, 232, 240, .95);
  border-radius: 16px;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.survey-choice:hover,
.survey-choice:focus-within {
  border-color: rgba(23, 63, 150, .3);
  background: #fff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .06);
  transform: translateY(-1px);
}

.survey-choice input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
}

.survey-choice span {
  min-width: 0;
  color: #1f2937;
  font-size: .95rem;
  font-weight: 750;
  line-height: 1.25;
}

.survey-consent-section {
  border-color: rgba(116, 191, 42, .35);
}

.survey-checkbox {
  align-items: flex-start;
  margin-bottom: 1rem;
  padding: .9rem 1rem;
  border: 1px solid rgba(226, 232, 240, .95);
  border-radius: 16px;
  background: #f8fafc;
}

.survey-checkbox span {
  display: block;
}

.survey-checkbox small {
  display: block;
  margin-top: .35rem;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.45;
}

.survey-contact-toggle {
  background: rgba(116, 191, 42, .08);
}

.survey-email-block {
  max-width: 520px;
}

.survey-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .5rem .15rem 0;
}

.survey-submit-row span {
  color: var(--muted);
  font-size: .92rem;
  font-weight: 700;
}

.survey-footer {
  margin-top: 2.5rem;
}

.survey-alert {
  max-width: 1040px;
  margin: 0 auto 1rem;
  padding: .9rem 1rem;
  border-color: rgba(185, 28, 28, .22);
  border-radius: 16px;
  background: rgba(254, 242, 242, .95);
  color: #991b1b;
  font-weight: 800;
}

.survey-unavailable,
.survey-thanks {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.6rem;
  border-radius: 24px;
}

.survey-unavailable h2,
.survey-thanks h2 {
  margin: 0 0 .75rem;
  color: var(--dark);
  font-size: clamp(1.45rem, 3vw, 2.2rem);
}

.survey-unavailable p,
.survey-thanks p {
  margin: 0 0 1rem;
  color: #475569;
}

.survey-intent-modal-panel {
  width: min(920px, calc(100% - 2rem));
  max-height: min(86vh, 860px);
}

.survey-intent-body {
  max-height: calc(86vh - 110px);
  overflow: auto;
}

.survey-intent-letter {
  max-width: 760px;
  margin: 0 auto;
}

.survey-intent-letter h3 {
  margin: 0 0 1rem;
  color: var(--dark);
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  line-height: 1.18;
}

.survey-intent-letter p {
  margin: 0 0 1rem;
  color: #334155;
  line-height: 1.75;
}

.survey-intent-letter ul {
  margin: -.1rem 0 1rem;
  padding: .95rem 1rem .95rem 1.05rem;
  border: 1px solid rgba(226, 232, 240, .85);
  border-radius: 18px;
  background: rgba(248, 250, 252, .72);
  color: #344054;
  line-height: 1.75;
  list-style: none;
}

.survey-intent-letter li {
  position: relative;
  margin: .35rem 0;
  padding-left: 1.65rem;
}

.survey-intent-letter li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .88em;
  width: .72rem;
  height: .72rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green), #9de06f);
  box-shadow: 0 0 0 5px rgba(116, 191, 42, .13);
  transform: translateY(-50%);
}

.survey-intent-letter li strong {
  color: var(--dark);
  font-weight: 760;
}

.survey-kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.survey-admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.survey-admin-wide {
  grid-column: span 2;
}

.survey-admin-panel {
  min-height: 330px;
}

.survey-admin-bars {
  display: grid;
  gap: .85rem;
}

.survey-admin-bar-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(120px, 1.3fr) 54px;
  gap: .75rem;
  align-items: center;
}

.survey-admin-bar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  min-width: 0;
}

.survey-admin-bar-label span {
  min-width: 0;
  color: #1f3b62;
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.25;
}

.survey-admin-bar-label strong {
  color: #08142c;
  font-size: .95rem;
}

.survey-admin-progress {
  width: 100%;
  height: 13px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #e2e8f0;
}

.survey-admin-progress::-webkit-progress-bar {
  border-radius: 999px;
  background: #e2e8f0;
}

.survey-admin-progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, #173f96, #74bf2a);
}

.survey-admin-progress::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, #173f96, #74bf2a);
}

.survey-admin-bar-row small {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 850;
  text-align: right;
}

.survey-admin-donut-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 190px;
  height: 190px;
  margin: .25rem auto 1rem;
}

.survey-admin-donut {
  width: 190px;
  height: 190px;
  transform: rotate(-90deg);
}

.survey-admin-donut-track,
.survey-admin-donut-segment {
  fill: none;
  stroke-width: 14;
}

.survey-admin-donut-track {
  stroke: #e2e8f0;
}

.survey-admin-donut-center {
  position: absolute;
  inset: 42px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, .85);
  text-align: center;
}

.survey-admin-donut-center strong {
  color: #08142c;
  font-size: 2rem;
  line-height: 1;
}

.survey-admin-donut-center span {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
}

.survey-admin-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
}

.survey-admin-legend span {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .55rem;
  border: 1px solid rgba(226, 232, 240, .95);
  border-radius: 999px;
  background: #f8fafc;
  color: #1f3b62;
  font-size: .78rem;
  font-weight: 800;
}

.survey-admin-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #64748b;
}

.survey-admin-legend i[data-color="0"] { background: #173f96; }
.survey-admin-legend i[data-color="1"] { background: #74bf2a; }
.survey-admin-legend i[data-color="2"] { background: #0aa6b5; }
.survey-admin-legend i[data-color="3"] { background: #ff8a1f; }
.survey-admin-legend i[data-color="4"] { background: #8b5cf6; }
.survey-admin-legend i[data-color="5"] { background: #64748b; }

.survey-latest-section {
  margin-top: 1rem;
}

.survey-export-footer {
  justify-content: flex-end;
  margin: 1rem 0 0;
}

@media (max-width: 1180px) {
  .survey-kpi-grid,
  .survey-admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .survey-admin-wide {
    grid-column: span 1;
  }
}

@media (max-width: 860px) {
  .survey-admin-page .dashboard-hero-actions {
    width: auto;
    align-items: center;
    flex: 0 0 auto;
    flex-direction: row;
    margin-left: auto;
  }

  .survey-admin-page .admin-header {
    align-items: flex-start;
  }

  .survey-admin-page .admin-header > div:first-child {
    min-width: 0;
  }

  .survey-hero-grid,
  .survey-choice-grid,
  .survey-choice-grid-compact,
  .survey-choice-grid-wide,
  .survey-kpi-grid,
  .survey-admin-grid {
    grid-template-columns: 1fr;
  }

  .survey-submit-row,
  .survey-admin-bar-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .survey-submit-row {
    flex-direction: column;
  }

  .survey-admin-bar-row small {
    text-align: left;
  }

  .survey-export-footer {
    justify-content: stretch;
    margin-top: 1rem;
  }

  .survey-export-footer .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .survey-header .brand img {
    height: 79px;
  }

  .survey-hero {
    padding: 2rem 0 1.4rem;
  }

  .survey-question,
  .survey-unavailable,
  .survey-thanks {
    padding: 1rem;
    border-radius: 18px;
  }
}

.survey-hero-copy h1 {
  font-weight: 600;
}

.survey-hero-copy h1 .word-color-green {
  color: var(--green) !important;
}

.visitor-consent-banner {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 260;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  width: min(760px, calc(100% - 2rem));
  padding: 1rem;
  border: 1px solid rgba(23, 63, 150, .16);
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 24px 58px rgba(15, 23, 42, .18);
  backdrop-filter: blur(16px);
}

.visitor-consent-banner.is-saved {
  opacity: 0;
  transform: translateY(.45rem);
  transition: opacity .18s ease, transform .18s ease;
}

.visitor-consent-copy {
  min-width: 0;
}

.visitor-consent-copy strong {
  display: block;
  margin-bottom: .2rem;
  color: var(--dark);
  font-size: .98rem;
}

.visitor-consent-copy p {
  margin: 0;
  color: var(--text);
  font-size: .92rem;
  line-height: 1.45;
  text-align: left;
}

.visitor-consent-copy .visitor-consent-feedback {
  margin-top: .45rem;
  color: #991b1b;
  font-weight: 700;
}

.visitor-consent-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .55rem;
}

.visitor-consent-actions .btn {
  min-height: 42px;
  padding: .7rem .95rem;
}

.visitor-consent-privacy {
  border: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-size: .9rem;
  font-weight: 800;
  cursor: pointer;
}

.visitor-consent-privacy:hover,
.visitor-consent-privacy:focus-visible {
  text-decoration: underline;
  outline: none;
}

@media (max-width: 720px) {
  .visitor-consent-banner {
    right: .6rem;
    bottom: .6rem;
    grid-template-columns: 1fr;
    width: calc(100% - 1.2rem);
    padding: .9rem;
    border-radius: 16px;
  }

  .visitor-consent-actions {
    justify-content: stretch;
  }

  .visitor-consent-actions .btn {
    flex: 1 1 120px;
  }

  .visitor-consent-privacy {
    flex: 1 1 100%;
    min-height: 36px;
    text-align: center;
  }
}

.admin-control-page .container {
  display: grid;
  gap: 1rem;
}

.admin-control-page .admin-header h1 {
  letter-spacing: 0;
}

.control-panel {
  padding: 1rem;
  border: 1px solid rgba(226, 232, 240, .95);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .06);
}

.admin-control-page .control-table-wrap {
  border-radius: 16px;
}

.admin-control-page .control-table {
  min-width: 0;
  table-layout: fixed;
}

.admin-control-page .control-table th,
.admin-control-page .control-table td {
  width: auto;
  padding: .82rem .75rem;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.38;
}

.admin-control-page .control-table th:nth-child(n),
.admin-control-page .control-table td:nth-child(n) {
  width: auto;
  white-space: normal;
}

.admin-control-page .control-table a {
  overflow-wrap: anywhere;
}

.admin-control-page .credit-summary-table .control-col-client {
  width: 28%;
}

.admin-control-page .credit-summary-table .control-col-pack {
  width: 14%;
}

.admin-control-page .credit-summary-table .control-col-credit {
  width: 15%;
}

.admin-control-page .credit-summary-table .control-col-date {
  width: 12%;
}

.admin-control-page .credit-summary-table .control-col-status {
  width: 13%;
}

.admin-control-page .credit-summary-table .control-col-action {
  width: 18%;
}

.admin-control-page .credit-ledger-table .control-col-date {
  width: 12%;
}

.admin-control-page .credit-ledger-table .control-col-ledger-client {
  width: 24%;
}

.admin-control-page .credit-ledger-table .control-col-pack {
  width: 11%;
}

.admin-control-page .credit-ledger-table .control-col-type {
  width: 14%;
}

.admin-control-page .credit-ledger-table .control-col-duration {
  width: 8%;
}

.admin-control-page .credit-ledger-table .control-col-remaining {
  width: 10%;
}

.admin-control-page .credit-ledger-table .control-col-description {
  width: 21%;
}

.control-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.control-panel-head h2 {
  margin: .1rem 0 0;
  color: var(--dark);
  font-size: 1.15rem;
  letter-spacing: 0;
}

.control-count {
  min-width: 2.4rem;
  padding: .32rem .6rem;
  border-radius: 999px;
  background: #e8f7dd;
  color: #2f6f14;
  font-weight: 800;
  text-align: center;
}

.control-table td,
.control-table th {
  vertical-align: top;
}

.control-alert {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: .25rem .55rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: .78rem;
  font-weight: 800;
}

.control-alert-danger {
  background: #fee2e2;
  color: #991b1b;
}

.control-alert-warning {
  background: #fff7ed;
  color: #9a3412;
}

.control-alert-ok {
  background: #e8f7dd;
  color: #2f6f14;
}

.duplicate-list {
  display: grid;
  gap: .75rem;
}

.duplicate-group {
  display: grid;
  gap: .75rem;
  padding: .85rem;
  border: 1px solid rgba(226, 232, 240, .95);
  border-radius: 8px;
  background: #f8fafc;
}

.duplicate-group header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .65rem;
  align-items: center;
}

.duplicate-group header strong {
  color: var(--dark);
}

.duplicate-group header span {
  color: #64748b;
  font-size: .85rem;
  font-weight: 800;
}

.duplicate-clients {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}

.duplicate-client {
  display: grid;
  gap: .22rem;
  min-width: 0;
  padding: .75rem;
  border: 1px solid rgba(226, 232, 240, .95);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.duplicate-client strong {
  color: var(--dark);
}

.duplicate-client span,
.duplicate-client small {
  color: #64748b;
}

@media (max-width: 860px) {
  .duplicate-clients {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .admin-control-page {
    padding-top: 1.15rem;
  }

  .admin-control-page .container {
    gap: .75rem;
    padding-inline: .7rem;
  }

  .admin-control-page .admin-top {
    margin-bottom: .2rem;
  }

  .admin-control-page .eyebrow {
    font-size: .78rem;
  }

  .admin-control-page .admin-header h1 {
    font-size: 2rem;
    line-height: 1.05;
  }

  .control-panel {
    padding: .75rem;
  }

  .control-panel-head,
  .duplicate-group header {
    grid-template-columns: 1fr;
  }

  .control-panel-head {
    align-items: stretch;
    flex-direction: column;
    gap: .45rem;
    margin-bottom: .75rem;
  }

  .control-panel-head h2 {
    font-size: 1.08rem;
    line-height: 1.2;
  }

  .control-count {
    justify-self: start;
    min-width: 2rem;
    padding: .24rem .5rem;
    font-size: .88rem;
  }

  .admin-control-page .control-table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .admin-control-page .control-table,
  .admin-control-page .control-table thead,
  .admin-control-page .control-table tbody,
  .admin-control-page .control-table tr,
  .admin-control-page .control-table th,
  .admin-control-page .control-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .admin-control-page .control-table colgroup,
  .admin-control-page .control-table thead {
    display: none;
  }

  .admin-control-page .control-table tbody {
    display: grid;
    gap: .65rem;
  }

  .admin-control-page .control-table tr {
    display: grid;
    gap: .44rem;
    padding: .75rem;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
  }

  .admin-control-page .control-table td {
    display: grid;
    grid-template-columns: minmax(6.5rem, 38%) minmax(0, 1fr);
    gap: .55rem;
    align-items: baseline;
    padding: 0;
    border-bottom: 0;
    color: #334155;
    font-size: .86rem;
  }

  .admin-control-page .control-table td::before {
    content: attr(data-label);
    color: #64748b;
    font-weight: 800;
  }

  .admin-control-page .control-table td[colspan] {
    display: block;
  }

  .admin-control-page .control-table td[colspan]::before {
    display: none;
  }

  .admin-control-page .control-table td[data-label="Client"] {
    grid-template-columns: 1fr;
    gap: .12rem;
  }

  .admin-control-page .control-table td[data-label="Client"]::before {
    font-size: .78rem;
  }

  .admin-control-page .control-table td[data-label="Client"] a,
  .admin-control-page .control-table td[data-label="Client"] strong {
    font-size: .95rem;
    line-height: 1.24;
  }

  .admin-control-page .credit-ledger-table td[data-label="Description"] {
    grid-template-columns: 1fr;
    padding-top: .15rem;
  }

  .admin-control-page .credit-ledger-table td[data-label="Description"]::before {
    font-size: .78rem;
  }
}
