/* Studio Feuille de route privée & Accès : design Bento compact, coloré, lumineux et contrasté (0 blanc sur blanc) */
.routeEditor,.routeAccessDialog{
 box-sizing:border-box;
 border:1.5px solid rgba(52,211,153,0.72)!important;
 border-radius:20px;
 background:linear-gradient(155deg,#0b1324 0%,#111c35 52%,#191330 100%)!important;
 background-color:#0b1324!important;
 color:#f8fafc!important;
 color-scheme:dark;
 box-shadow:0 0 32px rgba(52,211,153,0.24),0 24px 80px rgba(0,0,0,0.9)!important;
 width:min(880px,calc(100vw - 14px));
 max-width:calc(100vw - 14px);
 max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 18px);
 padding:0;
 font:13px/1.38 system-ui,-apple-system,sans-serif;
}
.routeEditor[data-studio-theme="gold-velvet"]{border-color:rgba(251,191,36,0.8)!important;box-shadow:0 0 34px rgba(251,191,36,0.28),0 24px 80px rgba(0,0,0,0.92)!important}
.routeEditor[data-studio-theme="emerald-cyan"]{border-color:rgba(6,182,212,0.8)!important;box-shadow:0 0 34px rgba(6,182,212,0.28),0 24px 80px rgba(0,0,0,0.92)!important}
.routeEditor[data-studio-theme="amber-teal"]{border-color:rgba(245,158,11,0.8)!important;box-shadow:0 0 34px rgba(245,158,11,0.28),0 24px 80px rgba(0,0,0,0.92)!important}
.routeEditor[data-studio-theme="magenta-violet"]{border-color:rgba(236,72,153,0.8)!important;box-shadow:0 0 34px rgba(236,72,153,0.28),0 24px 80px rgba(0,0,0,0.92)!important}

.routeEditor[open]{display:flex!important;flex-direction:column!important;overflow:hidden!important}
.routeEditor::backdrop,.routeAccessDialog::backdrop{background:rgba(3,7,18,0.84);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}

/* En-tête Studio */
.routeEditor header,.routeAccessDialog header{
 display:flex;
 justify-content:space-between;
 align-items:center;
 flex-wrap:wrap;
 gap:8px;
 background:linear-gradient(135deg,#064e3b 0%,#0c4a6e 50%,#1e1b4b 100%)!important;
 border-bottom:1.5px solid rgba(52,211,153,0.45);
 padding:10px 13px;
 flex-shrink:0;
}
.routeEditor[data-studio-theme="gold-velvet"] header{background:linear-gradient(135deg,#78350f 0%,#311042 55%,#0f172a 100%)!important;border-bottom-color:rgba(251,191,36,0.55)}
.routeEditor[data-studio-theme="amber-teal"] header{background:linear-gradient(135deg,#9a3412 0%,#115e59 55%,#0f172a 100%)!important;border-bottom-color:rgba(245,158,11,0.55)}
.routeEditor[data-studio-theme="magenta-violet"] header{background:linear-gradient(135deg,#831843 0%,#4c1d95 55%,#0f172a 100%)!important;border-bottom-color:rgba(244,114,182,0.55)}

.routeEditor h2,.routeAccessDialog h2{margin:0;font:850 16px/1.18 system-ui!important;letter-spacing:0!important;text-transform:none!important;color:#fef08a!important}
.routeEyebrow{margin:0 0 2px;color:#6ee7b7!important;font:800 9.5px/1.1 system-ui;text-transform:uppercase;letter-spacing:.11em}
.routeEventPill{
 display:inline-flex;
 align-items:center;
 gap:5px;
 margin:4px 0 0!important;
 padding:2.5px 9px;
 border-radius:999px;
 background:rgba(9,17,32,0.75);
 border:1px solid rgba(56,189,248,0.55);
 color:#e0f2fe!important;
 font:750 10.5px/1.2 system-ui;
}
.routeHeaderRight{display:flex;align-items:center;gap:6px;flex-wrap:wrap}

/* Switch Mode Normal / Mode Avancé */
.routeModeSwitch{
 display:inline-flex;
 background:rgba(9,17,32,0.88);
 padding:3px;
 border-radius:10px;
 border:1px solid rgba(56,189,248,0.45);
 gap:3px;
}
.routeModeBtn{
 min-height:29px!important;
 padding:4px 9px!important;
 border-radius:7px!important;
 border:1px solid transparent!important;
 background:transparent!important;
 color:#cbd5e1!important;
 -webkit-text-fill-color:#cbd5e1!important;
 font:800 10.5px/1.15 system-ui!important;
 cursor:pointer;
}
.routeModeBtn.isActive{
 background:linear-gradient(135deg,#d97706,#7c3aed)!important;
 background-color:#7c3aed!important;
 border-color:#fde047!important;
 color:#ffffff!important;
 -webkit-text-fill-color:#ffffff!important;
 box-shadow:0 2px 8px rgba(217,119,6,0.4);
}
.routeCloseBtn{
 min-height:31px!important;
 padding:4px 10px!important;
 border-radius:9px!important;
 border:1.5px solid #f87171!important;
 background:linear-gradient(135deg,#dc2626,#991b1b)!important;
 background-color:#dc2626!important;
 color:#ffffff!important;
 -webkit-text-fill-color:#ffffff!important;
 font:800 11px/1 system-ui!important;
}

.routeEditorBody{flex:1 1 auto;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:9px 11px;overscroll-behavior:contain}

/* Bannière Studio : 5 Modèles + Bouton Pré-remplir */
.routeStudioBanner{
 padding:9px 10px;
 border-radius:14px;
 background:linear-gradient(145deg,rgba(15,23,42,0.96),rgba(17,24,39,0.98));
 border:1.5px solid rgba(251,191,36,0.55);
 margin-bottom:9px;
 display:flex;
 flex-direction:column;
 gap:8px;
}
.routeStudioTopActions{
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:8px;
 flex-wrap:wrap;
}
.routeStudioTitleWrap{display:flex;flex-direction:column;gap:2px;min-width:200px;flex:1}
.routeStudioTitleWrap strong{font:800 11.5px/1.22 system-ui;color:#fef08a}
.routeStudioTitleWrap span{font:600 10.5px/1.25 system-ui;color:#93c5fd}
.routeAutofillBtns{display:flex;gap:6px;flex-wrap:wrap;width:100%}
.routeAutofillBtn{
 flex:1 1 240px;
 min-height:36px!important;
 padding:7px 12px!important;
 border-radius:10px!important;
 border:1.5px solid #fde047!important;
 background:linear-gradient(135deg,#059669 0%,#0284c7 55%,#7c3aed 100%)!important;
 background-color:#059669!important;
 color:#ffffff!important;
 -webkit-text-fill-color:#ffffff!important;
 font:850 11.5px/1.2 system-ui!important;
 box-shadow:0 4px 14px rgba(5,150,105,0.4)!important;
}
.routeResetBlankBtn{
 flex:0 0 auto;
 min-height:36px!important;
 padding:7px 10px!important;
 border-radius:10px!important;
 border:1.5px solid rgba(56,189,248,0.6)!important;
 background:linear-gradient(135deg,#1e293b,#0f172a)!important;
 background-color:#1e293b!important;
 color:#e0f2fe!important;
 -webkit-text-fill-color:#e0f2fe!important;
 font:800 11px/1.2 system-ui!important;
}

/* Grille des 5 Modèles */
.routePresetGrid{
 display:grid;
 grid-template-columns:repeat(5,minmax(0,1fr));
 gap:6px;
}
@media(max-width:760px){
 .routePresetGrid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .routePresetGrid .routePresetCard:first-child{grid-column:1 / -1}
}
.routePresetCard{
 padding:7px 8px!important;
 border-radius:11px!important;
 border:1.5px solid rgba(148,163,184,0.38)!important;
 background:linear-gradient(145deg,#0f172a,#090f1d)!important;
 background-color:#0f172a!important;
 color:#ffffff!important;
 -webkit-text-fill-color:#ffffff!important;
 text-align:left;
 display:flex;
 flex-direction:column;
 gap:2.5px;
 cursor:pointer;
 transition:transform .12s ease,border-color .12s ease;
}
.routePresetCard strong{font:800 11px/1.2 system-ui;color:#ffffff!important;-webkit-text-fill-color:#ffffff!important}
.routePresetCard small{font:550 9.5px/1.2 system-ui;color:#cbd5e1!important;-webkit-text-fill-color:#cbd5e1!important}
.routePresetBadge{
 align-self:flex-start;
 padding:1.5px 6px;
 border-radius:999px;
 font:800 8.5px/1.15 system-ui;
 text-transform:uppercase;
 letter-spacing:.04em;
 background:rgba(56,189,248,0.22);
 border:1px solid rgba(56,189,248,0.5);
 color:#bae6fd!important;
 -webkit-text-fill-color:#bae6fd!important;
}
.routePresetCard.tone-default{border-color:rgba(56,189,248,0.55)!important;background:linear-gradient(145deg,rgba(30,27,75,0.65),rgba(6,78,59,0.45),#0f172a)!important}
.routePresetCard.tone-gold{border-color:rgba(251,191,36,0.55)!important;background:linear-gradient(145deg,rgba(120,53,15,0.5),rgba(49,16,66,0.45),#0f172a)!important}
.routePresetCard.tone-gold .routePresetBadge{background:rgba(245,158,11,0.25);border-color:#fbbf24;color:#fef08a!important;-webkit-text-fill-color:#fef08a!important}
.routePresetCard.tone-emerald{border-color:rgba(52,211,153,0.55)!important;background:linear-gradient(145deg,rgba(6,78,59,0.52),rgba(12,74,110,0.45),#0f172a)!important}
.routePresetCard.tone-emerald .routePresetBadge{background:rgba(16,185,129,0.25);border-color:#34d399;color:#a7f3d0!important;-webkit-text-fill-color:#a7f3d0!important}
.routePresetCard.tone-amber{border-color:rgba(245,158,11,0.55)!important;background:linear-gradient(145deg,rgba(154,52,18,0.5),rgba(17,94,89,0.45),#0f172a)!important}
.routePresetCard.tone-amber .routePresetBadge{background:rgba(245,158,11,0.25);border-color:#f59e0b;color:#fde68a!important;-webkit-text-fill-color:#fde68a!important}
.routePresetCard.tone-pink{border-color:rgba(244,114,182,0.55)!important;background:linear-gradient(145deg,rgba(131,24,67,0.52),rgba(76,29,149,0.48),#0f172a)!important}
.routePresetCard.tone-pink .routePresetBadge{background:rgba(236,72,153,0.25);border-color:#f472b6;color:#fbcfe8!important;-webkit-text-fill-color:#fbcfe8!important}
.routePresetCard.isSelected{
 border:2px solid #fde047!important;
 box-shadow:0 0 16px rgba(250,204,21,0.42)!important;
 transform:translateY(-1px);
}
.routeTopCreateBar{
 display:flex;
 gap:6px;
 flex-wrap:wrap;
 padding-top:4px;
 border-top:1px solid rgba(251,191,36,0.28);
}
.routePublishTopBtn{
 flex:1 1 240px;
 min-height:38px!important;
 padding:8px 12px!important;
 border-radius:10px!important;
 border:1.5px solid #fde047!important;
 background:linear-gradient(135deg,#10b981 0%,#059669 50%,#0284c7 100%)!important;
 background-color:#059669!important;
 color:#ffffff!important;
 -webkit-text-fill-color:#ffffff!important;
 font:900 12px/1.2 system-ui!important;
 box-shadow:0 4px 16px rgba(16,185,129,0.45)!important;
}
.routePreviewTopBtn{
 flex:0 0 auto;
 min-height:38px!important;
 padding:8px 12px!important;
 border-radius:10px!important;
 border:1.5px solid #c084fc!important;
 background:linear-gradient(135deg,#7c3aed,#d97706)!important;
 background-color:#7c3aed!important;
 color:#ffffff!important;
 -webkit-text-fill-color:#ffffff!important;
 font:850 11.5px/1.2 system-ui!important;
}

/* Panneau Mode Avancé */
.routeAdvancedPanel{
 padding:10px;
 border-radius:13px;
 background:linear-gradient(145deg,rgba(49,16,66,0.45),rgba(15,23,42,0.96));
 border:1.5px solid rgba(192,132,252,0.65);
 margin-bottom:9px;
 display:flex;
 flex-direction:column;
 gap:8px;
}
.routeAdvancedHead{display:flex;flex-direction:column;gap:2px}
.routeAdvancedHead strong{font:800 12px/1.2 system-ui;color:#f3e8ff}
.routeAdvancedHead span{font:600 10.5px/1.2 system-ui;color:#c4b5fd}
.routeAdvancedGrid{
 display:grid;
 grid-template-columns:repeat(2,minmax(0,1fr));
 gap:7px;
}
@media(max-width:540px){.routeAdvancedGrid{grid-template-columns:1fr}}

/* Contrôles formulaires et boutons avec contraste garanti */
.routeEditor :is(button,input,textarea,select),.routeAccessDialog :is(button,input,a){
 box-sizing:border-box;
 border:1.5px solid rgba(56,189,248,0.52)!important;
 border-radius:9px;
 background:#091120!important;
 background-color:#091120!important;
 color:#ffffff!important;
 -webkit-text-fill-color:#ffffff!important;
 padding:5px 9px;
 font:650 11.5px/1.25 system-ui;
 min-height:33px;
 text-transform:none;
 letter-spacing:0;
 color-scheme:dark;
 -webkit-appearance:none;
 appearance:none;
}
.routeEditor select option{background:#091120!important;color:#ffffff!important}
.routeEditor :is(textarea,input,select){width:100%;min-width:0}
.routeEditor textarea::placeholder,.routeEditor input::placeholder{color:#64748b!important;-webkit-text-fill-color:#64748b!important}
.routeEditor :is(button,a),.routeAccessDialog :is(button,a){cursor:pointer;font-weight:800}
.routeEditor button:disabled{opacity:.5}

/* Polices et tailles dynamiques du Studio */
.routeEditor[data-studio-font="serif"] textarea{font-family:Georgia,"Times New Roman",serif!important}
.routeEditor[data-studio-font="mono"] textarea{font-family:ui-monospace,SFMono-Regular,Menlo,monospace!important;font-size:11px!important}
.routeEditor[data-studio-scale="compact"] textarea{font-size:11px!important;line-height:1.22!important;padding:4px 7px!important}
.routeEditor[data-studio-scale="large"] textarea{font-size:13px!important;line-height:1.35!important}

/* Disposition Bento 2 colonnes vs 1 colonne */
.routeEditor fieldset{
 min-width:0;
 border:1.5px solid rgba(56,189,248,0.48);
 border-radius:13px;
 background:linear-gradient(145deg,rgba(15,23,42,0.92),rgba(9,15,29,0.96));
 padding:9px 10px;
 margin:7px 0;
 display:grid;
 grid-template-columns:repeat(2,minmax(0,1fr));
 gap:7px;
}
.routeEditor[data-studio-layout="classic"] [data-route-fields] fieldset{grid-template-columns:1fr!important}
.routeEditor fieldset:nth-child(3n+1){border-color:rgba(192,132,252,0.52);background:linear-gradient(145deg,rgba(88,28,135,0.22),rgba(15,23,42,0.94))}
.routeEditor fieldset:nth-child(3n+2){border-color:rgba(251,191,36,0.52);background:linear-gradient(145deg,rgba(120,53,15,0.22),rgba(15,23,42,0.94))}
.routeEditor legend{
 padding:2.5px 9px;
 border-radius:999px;
 background:linear-gradient(135deg,rgba(2,132,199,0.35),rgba(88,28,135,0.35));
 border:1px solid rgba(56,189,248,0.55);
 color:#fef08a!important;
 font:800 10.5px/1.2 system-ui;
 text-transform:uppercase;
 letter-spacing:.04em;
}
.routeEditor label{display:grid;gap:3px;font:750 10.5px/1.2 system-ui;color:#bae6fd!important;min-width:0}
.routeEditor fieldset label:has(textarea[rows="3"]),.routeEditor fieldset label:has(textarea[rows="4"]){grid-column:1 / -1}

.routeModelBar{display:flex;flex-wrap:wrap;gap:6px;align-items:end;border-top:1px solid rgba(192,132,252,0.3);padding-top:8px;margin-top:4px}
.routeModelBar label{flex:1 1 200px}
.routeEditor .routeAccess{border-color:rgba(52,211,153,0.58)!important;background:linear-gradient(145deg,rgba(6,78,59,0.25),rgba(15,23,42,0.95))!important}
.routeAccess small,.routeAccess p{grid-column:1/-1;font-size:10.5px;color:#a7f3d0!important;margin:0}

/* Barre d'actions fixe en bas du Studio (div au lieu de footer pour ne jamais être masquée par KIS Booking) */
.routeEditor .routeEditorActionsBar,.routeEditor footer{
 display:block!important;
 visibility:visible!important;
 opacity:1!important;
 height:auto!important;
 max-height:none!important;
 flex-shrink:0!important;
 padding:8px 11px calc(9px + env(safe-area-inset-bottom,0px))!important;
 border-top:1.5px solid rgba(52,211,153,0.52)!important;
 background:linear-gradient(180deg,rgba(15,23,42,0.98),rgba(9,14,26,0.99))!important;
 box-shadow:0 -6px 20px rgba(0,0,0,0.45)!important;
 z-index:10;
}
.routeEditor .routeEditorActionsRow,.routeEditor footer>div{
 display:flex!important;
 flex-wrap:wrap;
 gap:6px;
 align-items:center;
}
.routeEditor .routeEditorActionsBar p,.routeEditor footer p{
 font-size:11px;
 color:#fde047!important;
 margin:0 0 6px!important;
 font-weight:800;
 line-height:1.25;
}
.routeEditor .routeEditorActionsBar p:empty{display:none}
.routeEditor .routeEditorActionsBar button,.routeEditor footer button{
 background:linear-gradient(135deg,#1e293b,#0f172a)!important;
 background-color:#1e293b!important;
 border-color:rgba(56,189,248,0.55)!important;
 color:#e0f2fe!important;
 -webkit-text-fill-color:#e0f2fe!important;
 min-height:34px!important;
 padding:6px 10px!important;
 font:800 11px/1.15 system-ui!important;
}
.routeEditor [data-route-preview-button]{
 background:linear-gradient(135deg,#7c3aed,#d97706)!important;
 background-color:#7c3aed!important;
 border-color:#fde047!important;
 color:#ffffff!important;
 -webkit-text-fill-color:#ffffff!important;
}
.routeEditor [data-route-back-docs]{
 background:linear-gradient(135deg,#0369a1,#1e3a8a)!important;
 background-color:#0369a1!important;
 border-color:#38bdf8!important;
 color:#ffffff!important;
 -webkit-text-fill-color:#ffffff!important;
}
.routeEditor .routePublish{
 flex:1 1 100%;
 min-height:40px!important;
 padding:9px 14px!important;
 background:linear-gradient(135deg,#10b981 0%,#059669 50%,#0284c7 100%)!important;
 background-color:#059669!important;
 color:#ffffff!important;
 -webkit-text-fill-color:#ffffff!important;
 font:900 12.5px/1.2 system-ui!important;
 border:1.5px solid #fde047!important;
 border-radius:11px!important;
 box-shadow:0 4px 16px rgba(16,185,129,0.48)!important;
}
.routeEditor .routePinGenBtn{
 grid-column:1/-1;
 background:linear-gradient(135deg,#1e293b,#0f172a)!important;
 border:1px dashed rgba(56,189,248,0.65)!important;
 color:#bae6fd!important;
 -webkit-text-fill-color:#bae6fd!important;
 font:750 11px/1.2 system-ui!important;
}
.routeEditor iframe{box-sizing:border-box;width:100%;height:min(60vh,560px);border:1.5px solid rgba(56,189,248,0.55);border-radius:12px;margin-bottom:10px;background:#ffffff}
.routeEditor :focus-visible,.routeAccessDialog :focus-visible{outline:2px solid #fbbf24;outline-offset:2px}
.routeAccessDialog{width:min(440px,calc(100vw - 16px));padding:0 14px 14px}
.routeAccessDialog header{margin:0 -14px}
.routeAccessDialog label{display:grid;gap:6px}
.routeAccessDialog input{width:100%}
.routeAccessDialog form{display:grid;gap:8px;margin:12px 0}
.routeAccessDialog a{display:block;text-align:center;text-decoration:none}
.routeAccessDialog small{font-size:10.5px;color:#93c5fd}
.routeAccessDialog [data-route-download]{background:linear-gradient(135deg,#059669,#0284c7)!important;background-color:#059669!important;color:#ffffff!important;-webkit-text-fill-color:#ffffff!important;font-weight:800;border-color:#34d399!important}
.routeEditor [hidden],.routeAccessDialog [hidden]{display:none!important}
.a-documents-prives .routeCreateButton{width:100%;min-height:40px;padding:9px 14px!important;margin:0 0 8px!important;border-radius:12px!important;border:1.5px solid #6ee7b7!important;background:linear-gradient(135deg,#059669 0%,#0284c7 100%)!important;background-color:#059669!important;color:#ffffff!important;-webkit-text-fill-color:#ffffff!important;font:850 12.5px/1.2 system-ui!important;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:6px;box-shadow:0 6px 18px rgba(5,150,105,0.4)!important}
@media(max-width:540px){
 .routeEditor fieldset{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
 .routeEditor .routeEditorActionsRow button:not(.routePublish){flex:1 1 auto}
 .routeEditor h2{font-size:15px!important}
 .routeEditor header,.routeEditor .routeEditorActionsBar{padding:8px 10px!important}
 .routeEditorBody{padding:7px 9px}
}
@media(max-height:480px){.routeEditor header{padding-top:5px!important;padding-bottom:5px!important}.routeEditor .routeEditorActionsBar{padding-top:5px!important;padding-bottom:5px!important}.routeEditor .routeEyebrow{display:none}}
.routeEditor .routePinToggle{display:flex;align-items:center;grid-column:1/-1}
.routeEditor .routePinToggle input{width:18px!important;min-height:18px!important;height:18px!important;accent-color:#10b981;margin-right:7px;-webkit-appearance:checkbox!important;appearance:auto!important}
