/* Clé D'Or — couche UI commune professionnelle */
:root{
  --cd-navy:#10213b;
  --cd-navy-2:#172c4b;
  --cd-gold:#c89a3d;
  --cd-gold-light:#f5e8c9;
  --cd-bg:#f5f6f8;
  --cd-surface:#ffffff;
  --cd-line:#e3e7ed;
  --cd-text:#182235;
  --cd-muted:#687487;
  --cd-success:#16845b;
  --cd-danger:#c63d4b;
  --cd-warning:#c98519;
  --cd-radius:16px;
}
body{background:var(--cd-bg)!important;color:var(--cd-text);font-family:"Plus Jakarta Sans",Inter,system-ui,sans-serif!important}
.cd-nav-icon,.cd-icon{width:19px;height:19px;display:inline-block;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.cd-icon-lg{width:23px;height:23px}.cd-icon-sm{width:16px;height:16px}
.cd-role-nav{background:#fff;border-bottom:1px solid var(--cd-line);box-shadow:0 2px 10px rgba(16,33,59,.035)}
.cd-role-nav-inner{max-width:1500px;margin:auto;padding:10px 28px;display:flex;align-items:center;gap:7px;overflow:auto}
.cd-role-nav a{display:inline-flex;align-items:center;gap:8px;padding:9px 13px;border-radius:11px;color:#5d6878;text-decoration:none;font-size:12px;font-weight:700;white-space:nowrap;transition:.18s ease}
.cd-role-nav a:hover{background:#f6f2e8;color:#9a701e}.cd-role-nav a.active{background:var(--cd-gold);color:#172235;box-shadow:0 5px 14px rgba(200,154,61,.2)}
.cd-role-nav a.active .cd-nav-icon{color:#172235}
.cd-page{max-width:1500px;margin:auto;padding:26px 28px 40px}
.cd-page-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:22px}
.cd-page-kicker{font-size:10px;text-transform:uppercase;letter-spacing:.14em;font-weight:800;color:#a47722}
.cd-page-title{margin:3px 0 0;font-size:26px;line-height:1.2;font-weight:800;color:var(--cd-navy);letter-spacing:-.03em}
.cd-page-subtitle{margin:5px 0 0;color:var(--cd-muted);font-size:12px}
.cd-card{background:var(--cd-surface);border:1px solid var(--cd-line);border-radius:var(--cd-radius);box-shadow:0 5px 22px rgba(16,33,59,.045)}
.cd-card-pad{padding:22px}
.cd-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;text-decoration:none;cursor:pointer;border-radius:11px;padding:10px 14px;font-size:12px;font-weight:800;transition:.18s ease}
.cd-btn:hover{transform:translateY(-1px)}.cd-btn-primary{background:var(--cd-navy);color:#fff}.cd-btn-primary:hover{background:#1b3559}.cd-btn-gold{background:var(--cd-gold);color:#152238}.cd-btn-soft{background:#f3f5f7;border:1px solid var(--cd-line);color:#455163}.cd-btn-danger{background:#fff0f2;border:1px solid #f5c8ce;color:#b33140}
.cd-field{display:flex;flex-direction:column;gap:6px}.cd-field.full{grid-column:1/-1}.cd-field label{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:#586476}.cd-field input,.cd-field textarea,.cd-field select,.cd-form-control{width:100%;border:1px solid #d9dee6;background:#fff;border-radius:10px;padding:10px 12px;color:var(--cd-text);font-size:12px;outline:none;transition:.16s ease}.cd-field textarea{resize:vertical;min-height:90px}.cd-field input:focus,.cd-field textarea:focus,.cd-field select:focus{border-color:var(--cd-gold);box-shadow:0 0 0 3px rgba(200,154,61,.13)}
.cd-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px}.cd-profile-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(260px,.7fr);gap:18px}.cd-profile-hero{background:linear-gradient(135deg,var(--cd-navy),#1c3659);border-radius:20px;padding:26px;color:#fff;margin-bottom:18px;position:relative;overflow:hidden}.cd-profile-hero:after{content:"";position:absolute;width:240px;height:240px;border:1px solid rgba(200,154,61,.2);border-radius:50%;right:-70px;top:-90px}.cd-profile-hero h1{font-size:26px;margin:5px 0 4px;font-weight:800}.cd-profile-hero p{font-size:12px;color:#c7d1df;margin:0}.cd-profile-avatar{width:50px;height:50px;border-radius:14px;background:rgba(200,154,61,.18);border:1px solid rgba(200,154,61,.35);display:grid;place-items:center;color:#f1cf7e;font-size:19px;font-weight:800;margin-bottom:13px}.cd-profile-avatar-icon{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.cd-eyebrow{font-size:9px;letter-spacing:.14em;text-transform:uppercase;font-weight:800;color:#9a701e}.cd-back{display:inline-flex;align-items:center;gap:7px;color:#647084;text-decoration:none;font-size:11px;font-weight:800;margin-bottom:14px}.cd-back:hover{color:#9a701e}.cd-back .cd-icon{width:15px;height:15px}
.cd-shell{min-height:calc(100vh - 64px);display:flex;background:var(--cd-bg)}.cd-sidebar{width:250px;background:linear-gradient(180deg,var(--cd-navy),#0c1728);color:#fff;display:flex;flex-direction:column;min-height:calc(100vh - 64px);border-right:1px solid #233957}.cd-sidebar-logo{padding:18px 18px 16px;border-bottom:1px solid rgba(255,255,255,.08);text-decoration:none;color:#fff;display:flex;flex-direction:column;gap:7px}.cd-sidebar-logo img{width:150px;height:auto;display:block}.cd-sidebar-logo span{font-size:9px;letter-spacing:.12em;color:#d9b45d;font-weight:800}.cd-nav{padding:13px;display:flex;flex-direction:column;gap:4px}.cd-nav>a,.cd-sidebar-bottom>a{display:flex;align-items:center;gap:10px;padding:10px 11px;border-radius:11px;color:#aebbd0;text-decoration:none;font-size:12px;font-weight:700}.cd-nav>a:hover,.cd-sidebar-bottom>a:hover{background:rgba(255,255,255,.06);color:#fff}.cd-nav>a.active{background:linear-gradient(135deg,#d7aa4d,#c58d2b);color:#162238;box-shadow:0 7px 16px rgba(200,154,61,.16)}.cd-sidebar-bottom{margin-top:auto;padding:13px;border-top:1px solid rgba(255,255,255,.08)}.cd-main{min-width:0;flex:1}.cd-content{max-width:1500px;margin:auto;padding:25px 28px 40px}
.cd-status{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:999px;font-size:10px;font-weight:800}.cd-status-dot{width:6px;height:6px;border-radius:50%;background:currentColor}.status-libre,.status-prete{background:#e8f7f0;color:#16754f}.status-occupee{background:#eef3fb;color:#38649c}.status-sale{background:#fff1ed;color:#bd5a31}.status-nettoyage{background:#fff7e5;color:#a76a0c}.status-maintenance{background:#eef0f3;color:#5f6978}
.cd-empty{padding:42px;text-align:center;color:#778397;font-size:12px}.cd-alert{padding:11px 13px;border:1px solid var(--cd-line);border-radius:11px;background:#f8fafc;font-size:11px}.cd-alert.error{background:#fff1f2;border-color:#f4c7cd;color:#a93443}.cd-alert.success{background:#edf9f4;border-color:#c5e9d8;color:#146c4b}
.cd-table{width:100%;border-collapse:separate;border-spacing:0}.cd-table th{background:#f7f8fa;color:#697487;padding:11px 13px;text-align:left;font-size:9px;text-transform:uppercase;letter-spacing:.1em;border-bottom:1px solid var(--cd-line)}.cd-table td{padding:12px 13px;border-bottom:1px solid #eef1f4;font-size:11px;color:#344054}.cd-table tbody tr:hover{background:#fbfcfd}.cd-table tr:last-child td{border-bottom:0}
.cd-top-user{display:flex;align-items:center;gap:9px}.cd-user-avatar{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;background:#e5c06c;color:#172238;font-size:12px;font-weight:900}.cd-header-logo{height:43px;width:auto;display:block}.cd-header{background:var(--cd-navy)!important;border-bottom:1px solid #294160!important}.cd-header .brand-caption{color:#e0bb68}
@media(max-width:900px){.cd-profile-grid,.cd-form-grid{grid-template-columns:1fr}.cd-sidebar{width:220px}.cd-page,.cd-content{padding:20px 16px 32px}.cd-role-nav-inner{padding:9px 12px}.cd-header-logo{height:37px}}
@media(max-width:700px){.cd-sidebar{display:none}.cd-page-head{align-items:flex-start;flex-direction:column}.cd-role-nav-inner{justify-content:flex-start}.cd-profile-hero h1{font-size:22px}}
/* Remove legacy emoji/icon styling from operational screens */
.premium-card,.bg-\[\#131f37\]{border-color:#253a59}
.cd-login{min-height:calc(100vh - 64px);background:radial-gradient(circle at 20% 15%,rgba(200,154,61,.10),transparent 30%),linear-gradient(135deg,#0b1729,#132844 58%,#0e1c31);display:grid;place-items:center;padding:36px 18px;position:relative;overflow:hidden}.cd-login-orbit{position:absolute;width:520px;height:520px;border:1px solid rgba(200,154,61,.12);border-radius:50%;right:-180px;top:-210px}.cd-login-inner{width:min(430px,100%);position:relative;z-index:2}.cd-login-brand{text-align:center;margin-bottom:22px}.cd-login-logo{width:220px;max-width:78%;height:auto;display:block;margin:0 auto 9px}.cd-login-brand p{margin:0;color:#d9b45d;text-transform:uppercase;letter-spacing:.15em;font-size:9px;font-weight:800}.cd-login-card{background:#fff;border:1px solid rgba(255,255,255,.16);border-radius:20px;padding:25px;box-shadow:0 24px 70px rgba(0,0,0,.28);position:relative;overflow:hidden}.cd-login-accent{position:absolute;left:0;right:0;top:0;height:4px;background:linear-gradient(90deg,#a87927,#e0bc68,#a87927)}.cd-login-heading{display:flex;align-items:center;gap:12px;margin-bottom:20px}.cd-login-icon{width:42px;height:42px;border-radius:12px;background:#f7edd8;color:#a47722;display:grid;place-items:center}.cd-login-heading h1{font-size:19px;color:#13213a;margin:0;font-weight:800}.cd-login-heading p{font-size:11px;color:#748094;margin:2px 0 0}.cd-login-form{display:grid;gap:15px}.cd-login-input{position:relative}.cd-login-input .cd-nav-icon{position:absolute;left:11px;top:50%;transform:translateY(-50%);color:#8792a2;width:16px;height:16px}.cd-login-input input{padding-left:36px!important}.cd-login-submit{width:100%;margin-top:3px;padding:12px 15px}.cd-login-foot{margin-top:17px;padding-top:13px;border-top:1px solid #edf0f4;display:flex;justify-content:space-between;gap:12px;color:#8993a1;font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.06em}.cd-login-foot span:last-child{display:inline-flex;align-items:center;gap:5px}.cd-login-foot .cd-nav-icon{width:12px;height:12px}@media(max-width:480px){.cd-login-card{padding:21px}.cd-login-logo{width:190px}.cd-login-foot{flex-direction:column}}
.field-error{color:#b33140;font-size:10px;margin-top:2px}.field-help{color:#8792a2;font-size:9px}.cd-form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px;padding-top:16px;border-top:1px solid #edf0f4}.profile-side-title{margin:6px 0 2px;font-size:18px;color:var(--cd-navy)}.profile-side-text{margin:0;color:#7b8797;font-size:10px}.profile-link-card{display:flex;align-items:center;gap:12px;text-decoration:none;color:#fff;background:linear-gradient(135deg,var(--cd-navy),#1b3559)}.profile-link-card>.cd-nav-icon{margin-left:auto;color:#e4c477}.profile-link-card h2{margin:4px 0;font-size:15px}.profile-link-card p{margin:0;color:#c9d3df;font-size:10px}.profile-code{font-family:"IBM Plex Mono",monospace;font-size:10px;color:var(--cd-navy);margin-top:8px;word-break:break-all}.profile-meta{display:flex;justify-content:space-between;gap:10px;padding-top:10px;margin-top:10px;border-top:1px solid #edf0f4;font-size:10px}.profile-meta strong{color:#3b4758}.profile-big-number{font-size:29px;font-weight:900;color:var(--cd-navy);margin-top:4px}
.cd-inline-arrow{display:inline-flex;vertical-align:middle;margin:0 4px;color:#d8b35e}.cd-inline-arrow .cd-nav-icon{width:13px;height:13px}


/* =========================================================
   CLÉ D'OR — POLISH VISUEL V2
   Référence: palette Clé D'Or (bleu nuit / or / ivoire)
   Objectif: améliorer emplacement, hiérarchie et finition
   sans changer la structure fonctionnelle de départ.
   ========================================================= */

:root{
  --cd-navy:#13233d;
  --cd-navy-deep:#0c1729;
  --cd-navy-soft:#1d3151;
  --cd-gold:#c99a43;
  --cd-gold-bright:#e0bc68;
  --cd-gold-soft:#f7edd8;
  --cd-ivory:#fbfaf7;
  --cd-bg:#f3f5f7;
  --cd-surface:#ffffff;
  --cd-line:#e2e6ec;
  --cd-text:#1a2638;
  --cd-muted:#718096;
}

/* Fond général : clair, hôtelier et moins gris */
body{
  background:
    radial-gradient(circle at 92% 0%,rgba(201,154,67,.055),transparent 25rem),
    var(--cd-bg)!important;
  color:var(--cd-text);
}

/* Header : même emplacement, mais meilleure respiration */
.cd-header{
  position:sticky;
  top:0;
  z-index:90;
  background:linear-gradient(180deg,#11213a 0%,#0e1b30 100%)!important;
  border-bottom:1px solid rgba(224,188,104,.18)!important;
  box-shadow:0 5px 22px rgba(9,20,37,.14)!important;
}
.cd-header > div{
  max-width:1540px!important;
  padding-left:28px!important;
  padding-right:28px!important;
}
.cd-header .h-16{
  height:68px!important;
}
.cd-header-logo{
  width:174px!important;
  height:auto!important;
  max-height:48px;
  object-fit:contain;
  filter:drop-shadow(0 4px 12px rgba(0,0,0,.18));
}
/* Le SVG contient déjà le nom Clé D'Or : on évite le doublon visuel. */
.cd-header-logo + div{
  display:none!important;
}
.cd-header button{
  border-color:rgba(224,188,104,.20)!important;
  background:rgba(255,255,255,.055)!important;
  backdrop-filter:blur(8px);
}
.cd-header button:hover{
  background:rgba(224,188,104,.11)!important;
  border-color:rgba(224,188,104,.38)!important;
}
.cd-header .text-amber-400{
  color:var(--cd-gold-bright)!important;
}

/* Navigation de rôle : légère, alignée sous le header */
.cd-role-nav{
  position:sticky;
  top:68px;
  z-index:70;
  background:rgba(255,255,255,.96)!important;
  border-bottom:1px solid var(--cd-line)!important;
  box-shadow:0 3px 13px rgba(15,27,45,.045)!important;
  backdrop-filter:blur(12px);
}
.cd-role-nav-inner{
  max-width:1540px!important;
  padding:9px 28px!important;
  gap:6px!important;
}
.cd-role-nav a{
  border:1px solid transparent;
  color:#657083!important;
  padding:9px 13px!important;
}
.cd-role-nav a:hover{
  background:#fbf6e9!important;
  color:#8d661e!important;
  border-color:#eee0bf;
}
.cd-role-nav a.active{
  background:var(--cd-gold)!important;
  color:#18253a!important;
  border-color:#c18f35!important;
  box-shadow:0 5px 14px rgba(201,154,67,.20)!important;
}

/* Pages : même largeur générale, meilleure hiérarchie */
.cd-page{
  max-width:1540px!important;
  padding:28px 28px 44px!important;
}
.cd-page-head{
  margin-bottom:24px!important;
}
.cd-page-kicker,.cd-eyebrow{
  color:#9b711f!important;
  letter-spacing:.16em!important;
}
.cd-page-title{
  color:var(--cd-navy)!important;
  font-size:27px!important;
}
.cd-page-subtitle{
  color:#778397!important;
}

/* Cartes : plus proches du style premium du projet */
.cd-card{
  background:rgba(255,255,255,.98)!important;
  border:1px solid var(--cd-line)!important;
  border-radius:15px!important;
  box-shadow:0 6px 22px rgba(17,32,55,.045)!important;
}
.cd-card:hover{
  border-color:#d9dfe7!important;
  box-shadow:0 10px 28px rgba(17,32,55,.07)!important;
}
.cd-card-pad{
  padding:22px!important;
}

/* Hero profil : conserver sa forme, renforcer l'identité Clé D'Or */
.cd-profile-hero{
  background:
    radial-gradient(circle at 88% 15%,rgba(224,188,104,.15),transparent 11rem),
    linear-gradient(135deg,#10213a 0%,#1a3152 62%,#142742 100%)!important;
  border:1px solid rgba(224,188,104,.14);
  border-radius:18px!important;
  padding:28px!important;
  box-shadow:0 14px 34px rgba(10,25,45,.12)!important;
}
.cd-profile-hero:after{
  border-color:rgba(224,188,104,.18)!important;
}
.cd-profile-avatar{
  background:rgba(224,188,104,.14)!important;
  border-color:rgba(224,188,104,.32)!important;
  color:#f1d58a!important;
}

/* Formulaires */
.cd-form-grid{
  gap:18px!important;
}
.cd-field label{
  color:#5c687a!important;
}
.cd-field input,.cd-field textarea,.cd-field select,.cd-form-control{
  background:#fff!important;
  border-color:#d8dee7!important;
  border-radius:10px!important;
  min-height:42px;
}
.cd-field input:focus,.cd-field textarea:focus,.cd-field select:focus{
  border-color:var(--cd-gold)!important;
  box-shadow:0 0 0 3px rgba(201,154,67,.12)!important;
}
.cd-form-actions{
  border-top-color:#edf0f4!important;
}

/* Boutons : hiérarchie plus nette */
.cd-btn-primary{
  background:var(--cd-navy)!important;
}
.cd-btn-gold{
  background:linear-gradient(180deg,#d9ad57,#c59237)!important;
  color:#16243a!important;
  box-shadow:0 5px 13px rgba(201,154,67,.16);
}
.cd-btn-soft{
  background:#f7f8fa!important;
  border-color:#dfe4eb!important;
}
.cd-btn-danger{
  background:#fff4f4!important;
}

/* Blocs secondaires du profil */
.profile-link-card{
  background:linear-gradient(135deg,#13253f,#1d3659)!important;
  border-color:#274465!important;
  box-shadow:0 10px 25px rgba(13,31,55,.10)!important;
}
.profile-code{
  background:#f7f8fa;
  border:1px dashed #d8dee7;
  border-radius:9px;
  padding:10px 11px;
}
.profile-meta{
  border-top-color:#edf0f4!important;
}

/* Tableaux */
.cd-table{
  overflow:hidden;
}
.cd-table th{
  background:#f8f9fb!important;
  color:#687488!important;
  border-bottom:1px solid #dfe4eb!important;
}
.cd-table td{
  color:#3a4658!important;
}
.cd-table tbody tr:hover{
  background:#fcfbf8!important;
}

/* Alertes et états */
.cd-alert{
  background:#fafbfc!important;
  border-color:#e1e5eb!important;
}
.cd-alert.error{
  background:#fff5f5!important;
}
.cd-alert.success{
  background:#f1faf6!important;
}

/* Icônes SVG : une seule règle visuelle cohérente */
.cd-nav-icon,.cd-icon,.icon{
  stroke:currentColor;
  fill:none;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.cd-nav-icon,.cd-icon{
  width:19px;
  height:19px;
}
.cd-icon-lg{width:23px;height:23px}
.cd-icon-sm{width:16px;height:16px}

/* Notifications */
.notification-panel{
  border:1px solid #dfe4eb!important;
  box-shadow:0 18px 45px rgba(16,33,59,.14)!important;
}

/* Mobile : garder la forme générale, seulement adapter les espacements */
@media(max-width:900px){
  .cd-header > div{
    padding-left:16px!important;
    padding-right:16px!important;
  }
  .cd-header .h-16{height:62px!important}
  .cd-role-nav{top:62px}
  .cd-header-logo{width:158px!important}
  .cd-page{padding:20px 16px 34px!important}
}
@media(max-width:700px){
  .cd-header-logo{width:145px!important}
  .cd-header .flex.items-center.gap-5{gap:8px!important}
  .cd-header .text-left{display:none!important}
  .cd-page-title{font-size:23px!important}
}
@media(max-width:480px){
  .cd-header-logo{width:132px!important}
  .cd-header > div{padding-left:12px!important;padding-right:12px!important}
  .cd-page{padding-left:12px!important;padding-right:12px!important}
  .cd-profile-hero{padding:22px!important}
}

/* Établissement : consultation pour les rôles non administrateurs */
.cd-profile-form[data-readonly="1"] input:disabled,
.cd-profile-form[data-readonly="1"] textarea:disabled,
.cd-profile-form[data-readonly="1"] select:disabled{
  background:#f8fafc;
  color:#596579;
  border-color:#e5e7eb;
  cursor:not-allowed;
  opacity:1;
}
.cd-profile-form[data-readonly="1"] .cd-form-actions{
  display:none;
}
.cd-alert-readonly{
  display:flex;
  align-items:flex-start;
  gap:9px;
  padding:11px 13px;
  border-radius:11px;
  background:#fff8e7;
  border:1px solid #f0ddb1;
  color:#765719;
  font-size:11px;
  line-height:1.55;
}
.cd-alert-readonly svg{
  width:17px;
  height:17px;
  flex:none;
  margin-top:1px;
}


/* Filtres et tri des notifications/communications */
.cd-notification-toolbar,.cd-communication-toolbar{display:flex;align-items:center;gap:8px;margin-top:10px}
.cd-notification-toolbar select,.cd-communication-toolbar select{min-height:32px;padding:6px 9px;border:1px solid #d8dee8;border-radius:8px;background:#fff;color:#475569;font-size:11px;font-weight:700;outline:none}
.cd-notification-toolbar select:focus,.cd-communication-toolbar select:focus{border-color:#c89a3d;box-shadow:0 0 0 2px rgba(200,154,61,.12)}
.cd-communication-toolbar{padding:0 18px 10px;justify-content:flex-end}
.cd-communication-toolbar select{background:#f8fafc}
