/* ==========================================================================
   VARIABLES & RESET
   ========================================================================== */
:root { --bg-color: #0a0a0a; --rtm-green: #84cc16; --text-light: #f3f4f6; --card-bg: #171717; --border-color: #333; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background-color: var(--bg-color); color: var(--text-light); font-family: 'Poppins', sans-serif; line-height: 1.6; }

/* ==========================================================================
   HEADER & STRUCTURE GLOBALE
   ========================================================================== */
header { text-align: center; padding: 40px 20px 20px; background: linear-gradient(180deg, #111 0%, var(--bg-color) 100%); }
.logo-img { width: 130px; height: 130px; border-radius: 50%; border: 4px solid var(--rtm-green); object-fit: contain; background-color: #fff; padding: 5px; box-shadow: 0 0 20px rgba(132, 204, 22, 0.3); margin-bottom: 15px; }
.subtitle { color: #aaa; font-size: 1.1rem; margin-bottom: 10px; font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: 1px; }
.container { max-width: 1200px; margin: 0 auto; padding: 10px 20px; }
.footer { text-align: center; padding: 40px 20px; border-top: 1px solid var(--border-color); margin-top: 40px; color: #888; }
.footer a { color: var(--rtm-green); text-decoration: none; font-weight: bold; }

/* ==========================================================================
   COMPOSANTS UTILISATEUR (Boutons, Formulaires, Box Email)
   ========================================================================== */
.btn-install-android { display: none; background: transparent; color: var(--rtm-green); border: 2px solid var(--rtm-green); padding: 8px 20px; border-radius: 25px; font-weight: bold; font-size: 0.9rem; cursor: pointer; margin: 15px auto 0; text-transform: uppercase; font-family: 'Oswald', sans-serif; transition: 0.3s; }
.btn-install-android:hover { background: var(--rtm-green); color:#000; }
.email-permanent-box { background: #171717; padding: 20px; border-radius: 8px; border: 1px solid #333; margin-bottom: 25px; border-left: 4px solid var(--rtm-green); }
.email-permanent-box p.title { font-size: 1rem; color: var(--rtm-green); font-family: 'Oswald', sans-serif; text-transform: uppercase; margin-bottom: 5px; }
.email-permanent-box p.desc { font-size: 0.85rem; color: #aaa; margin-bottom: 15px; }
.email-form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.email-form-row input { flex: 1 1 200px; padding: 12px; border-radius: 4px; border: 1px solid #333; background: #0a0a0a; color: #fff; font-family: 'Poppins', sans-serif; }
.email-form-row button { background: var(--rtm-green); color: #000; font-weight: bold; border: none; padding: 12px 25px; border-radius: 4px; cursor: pointer; font-family: 'Oswald', sans-serif; text-transform: uppercase; }

/* ==========================================================================
   TABLEAU DU PLANNING
   ========================================================================== */
.table-responsive { width: 100%; overflow-x: auto; margin-bottom: 40px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
table { width: 100%; min-width: 900px; border-collapse: collapse; background-color: var(--card-bg); }
th, td { border: 1px solid var(--border-color); text-align: center; }
td { height: 90px; }
th { background-color: var(--rtm-green); color: #000; font-family: 'Oswald', sans-serif; padding: 15px; font-size: 1.1rem; text-transform: uppercase; }
.time-col { font-weight: bold; color: var(--rtm-green); background-color: #111; }
td.course { transition: all 0.2s ease; position: relative; padding: 10px; }
td.course h5 { font-family: 'Oswald', sans-serif; font-size: 1.1rem; margin-bottom: 5px; color: var(--text-light); }
td.course span { font-size: 0.8rem; text-transform: uppercase; font-weight: bold; }
td.split-cell { padding: 0; }
.half-course { height: 50%; display: flex; flex-direction: column; justify-content: center; align-items: center; border-bottom: 1px solid var(--border-color); transition: all 0.2s ease; padding: 5px; position: relative;}
.half-course:last-child { border-bottom: none; }
.half-course h5 { font-family: 'Oswald', sans-serif; font-size: 0.95rem; margin: 0 0 2px 0; color: var(--text-light); }
.half-course span { font-size: 0.7rem; text-transform: uppercase; font-weight: bold; }

/* ÉTATS DES COURS */
.available { cursor: pointer; }
.available span { color: var(--rtm-green); }
.available:hover { background-color: var(--rtm-green); z-index: 10; box-shadow: inset 0 0 15px rgba(0,0,0,0.5); }
.available:hover h5, .available:hover span { color: #000; }
.full { background-color: #050505; cursor: not-allowed; opacity: 0.6; }
.full h5 { text-decoration: line-through; color: #555; }
.full span { color: #ef4444; }
.reserved { background-color: #030303 !important; cursor: not-allowed; opacity: 0.8; position: relative; overflow: hidden; pointer-events: none;}
.reserved::after { content: 'RÉSERVÉ'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-12deg); font-size: 1.1rem; color: var(--rtm-green); font-family: 'Oswald', sans-serif; border: 2px solid var(--rtm-green); padding: 2px 10px; border-radius: 4px; background: rgba(0,0,0,0.9); z-index: 10; text-shadow: 0px 0px 5px rgba(132,204,22,0.5); }
.reserved h5 { color: #444 !important; }
.reserved span { visibility: hidden; } 

/* ==========================================================================
   ESPACE CLIENT (Mes Réservations)
   ========================================================================== */
#zone-mes-reservations { display: none; background: #171717; padding: 20px; border-radius: 8px; border: 1px solid var(--rtm-green); margin-bottom: 30px; }
#zone-mes-reservations h3 { color: var(--rtm-green); font-family: 'Oswald', sans-serif; margin-bottom: 15px; border-bottom: 1px solid #333; padding-bottom: 10px; }
.btn-logout { background: transparent; color: #aaa; border: 1px solid #555; padding: 5px 10px; border-radius: 4px; cursor: pointer; float: right; font-size: 0.8rem; }
.btn-logout:hover { color: #fff; border-color: #fff; }

/* ==========================================================================
   MODALS (Réservation & PWA Android)
   ========================================================================== */
.modal { display: none; position: fixed; z-index: 999; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.85); backdrop-filter: blur(5px); }
.modal-content { background-color: var(--card-bg); margin: 5% auto; padding: 30px; border-top: 5px solid var(--rtm-green); border-radius: 8px; width: 90%; max-width: 400px; text-align: center; }
.close-btn { color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer; margin-top: -20px; margin-right: -10px; }
.modal h3 { font-family: 'Oswald', sans-serif; color: var(--rtm-green); margin-bottom: 20px; }
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.9rem; color: #ccc; }
.form-group input { width: 100%; padding: 12px; border: 1px solid var(--border-color); background-color: var(--bg-color); color: var(--text-light); border-radius: 5px; font-family: 'Poppins', sans-serif; }
.submit-btn { width: 100%; padding: 15px; background-color: var(--rtm-green); color: #000; border: none; border-radius: 5px; font-weight: bold; font-size: 1.1rem; cursor: pointer; text-transform: uppercase; font-family: 'Oswald', sans-serif; }
.btn-calendar { display: inline-block; margin-top: 15px; padding: 10px 15px; background: #4285F4; color: white; text-decoration: none; border-radius: 5px; font-weight: bold; font-size: 0.9rem; }

.android-install-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 99999; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(8px); }
.android-modal-content { background: #111; width: 90%; max-width: 360px; padding: 35px 20px 25px; border-radius: 20px; text-align: center; border: 2px solid var(--rtm-green); box-shadow: 0 10px 40px rgba(132,204,22,0.4); position: relative; }
.modal-logo-energy { width: 80px; height: 80px; border-radius: 50%; border: 3px solid var(--rtm-green); margin-bottom: 15px; background: #fff; padding: 2px; object-fit: contain; }
.android-modal-content h3 { color: var(--rtm-green); font-family: 'Oswald', sans-serif; font-size: 1.6rem; margin-bottom: 10px; text-transform: uppercase; }
.android-modal-content p { color: #ccc; font-size: 0.95rem; margin-bottom: 20px; }
.modal-benefits { list-style: none; padding: 0; margin-bottom: 25px; text-align: left; display: inline-block; }
.modal-benefits li { color: #fff; font-size: 0.95rem; margin-bottom: 10px; font-weight: 600; display: flex; align-items: center; gap: 10px;}
.btn-energy { background: var(--rtm-green); color: #000; border: none; padding: 15px 20px; border-radius: 30px; font-weight: bold; font-size: 1.1rem; cursor: pointer; text-transform: uppercase; font-family: 'Oswald', sans-serif; width: 100%; box-shadow: 0 5px 15px rgba(132,204,22,0.3); }
.modal-later { color: #666; font-size: 0.85rem; margin-top: 15px; cursor: pointer; text-decoration: underline; }

/* ==========================================================================
   MODAL IOS (PWA Simulator)
   ========================================================================== */
.ios-full-modal { position: fixed; top:0; left:0; width:100%; height:100%; background:rgba(10,10,10,0.95); z-index:999999; display:flex; align-items:center; justify-content:center; font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.ios-modal-content { background:#111; width:95%; max-width:400px; max-height:90vh; border-radius:24px; display:flex; flex-direction:column; overflow:hidden; box-shadow:0 25px 50px -12px rgba(132,204,22,0.15); border: 1px solid #333; }
.ios-modal-header { background:#050505; padding:15px 20px; display:flex; justify-content:space-between; align-items:center; color:#fff; border-bottom: 2px solid #84cc16; }
.ios-modal-header h2 { margin:0; font-size:1.3rem; font-family: 'Oswald', sans-serif; letter-spacing:1px; color:#fff;}
.ios-modal-header h2 span { color:#84cc16; }
.close-modal-btn { background:none; border:none; color:#888; font-size:2rem; cursor:pointer; line-height:1; }
.ios-modal-body { padding:20px; flex:1; overflow-y:auto; display:flex; flex-direction:column; align-items:center; }
.guide-intro { text-align:center; color:#ccc; font-size:0.9rem; margin:0 0 20px 0; font-family: 'Poppins', sans-serif; }
.iphone-simulator { width:230px; height:400px; border:8px solid #222; border-radius:35px; background:#f1f5f9; position:relative; overflow:hidden; box-shadow:0 10px 20px rgba(0,0,0,0.5); margin-bottom:20px; }
.iphone-screen { height:100%; display:flex; flex-direction:column; justify-content:space-between; position:relative; }
.simulated-app-header { background:#84cc16; color:#000; padding:12px 6px 6px; font-size:0.75rem; text-align:center; font-weight:bold; }
.simulated-site-content { flex:1; padding:10px; position:relative; background:#0a0a0a; overflow:hidden; }
.simulated-hero { border:1px solid #333; padding:15px; border-radius:8px; background:#111; text-align:center; margin-top:20px; color:#fff; }
.simulated-hero h4 { margin:0 0 8px 0; font-size:0.8rem; }
.simulated-button { background:#84cc16; color:#000; font-size:0.7rem; padding:6px; border-radius:4px; font-weight:bold; width:80px; margin:0 auto; }
.safari-share-menu { position:absolute; bottom:0; left:0; width:100%; background:rgba(240,240,245,0.95); backdrop-filter:blur(10px); border-top-left-radius:14px; border-top-right-radius:14px; box-shadow:0 -4px 15px rgba(0,0,0,0.3); padding:10px 10px 20px; box-sizing:border-box; animation: slideUpMenu 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes slideUpMenu { from { bottom: -150px; } to { bottom: 0; } }
.menu-item { background:#fff; padding:12px; font-size:0.8rem; font-weight:400; margin-bottom:1px; display:flex; justify-content:space-between; align-items:center; position:relative; color:#000; }
.menu-item:first-child { border-top-left-radius:10px; border-top-right-radius:10px; }
.menu-item:last-child { border-bottom-left-radius:10px; border-bottom-right-radius:10px; margin-bottom:0; }
.simulated-safari-bar { background:rgba(250,250,250,0.95); border-top:1px solid #d1d1d6; padding:12px 15px 25px; display:flex; justify-content:space-between; align-items:center; }
.share-btn-wrapper { position:relative; cursor:pointer; padding:2px; }
.step-badge-marker { position:absolute; top:-8px; right:-10px; background:#84cc16; color:#000; width:18px; height:18px; border-radius:50%; font-size:0.65rem; font-weight:bold; display:flex; align-items:center; justify-content:center; box-shadow:0 0 0 4px rgba(132,204,22,0.3); animation: pulseMarker 1.5s infinite; }
@keyframes pulseMarker { 0% { transform: scale(1); } 50% { transform: scale(1.15); } 100% { transform: scale(1); } }
.active-highlight { background:rgba(132,204,22,0.15) !important; box-shadow: inset 0 0 0 2px #84cc16 !important; z-index:10; }
.steps-description-box { width:100%; min-height:65px; margin-top:5px; }
.step-desc { display:none; font-size:0.95rem; line-height:1.4; color:#fff; text-align:center; font-family: 'Poppins', sans-serif;}
.step-desc.active { display:block; }
.step-num { background:#84cc16; color:#000; display:inline-block; width:22px; height:22px; border-radius:50%; text-align:center; line-height:22px; font-weight:bold; font-size:0.85rem; margin-right:6px; }
.ios-modal-footer { padding:15px 20px; border-top:1px solid #333; display:flex; gap:15px; background:#050505; }
.ios-modal-footer button { flex:1; padding:12px; border-radius:8px; font-weight:bold; cursor:pointer; font-size:0.95rem; border:none; transition:0.2s; font-family: 'Poppins', sans-serif;}
.btn-primary { background:#84cc16; color:#000; }
.btn-primary:hover { background:#65a30d; }
.btn-secondary { background:#222; color:#aaa; border:1px solid #444; }
.btn-secondary:disabled { opacity:0.3; cursor:not-allowed; }
/* ==========================================================================
   NOTIFICATIONS (TOASTS) & SPINNERS (UX Premium)
   ========================================================================== */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 99999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { background: #222; color: #fff; padding: 15px 25px; border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.5); font-family: 'Poppins', sans-serif; font-size: 0.95rem; border-left: 5px solid #444; opacity: 0; transform: translateX(120%); transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); display: flex; align-items: center; gap: 12px; pointer-events: auto; }
.toast.show { opacity: 1; transform: translateX(0); }
.toast.success { border-left-color: var(--rtm-green); }
.toast.error { border-left-color: #ef4444; }
.toast-icon { font-size: 1.2rem; }

/* Animation de chargement (Anti Double-Clic) */
.spinner { border: 3px solid rgba(255,255,255,0.1); border-left-color: #000; border-radius: 50%; width: 20px; height: 20px; animation: spin 1s linear infinite; display: inline-block; vertical-align: middle; margin-right: 8px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.btn-disabled { opacity: 0.7; cursor: not-allowed !important; }