:root {
    --orange: #FF6B00;
    --orange-dark: #e65c00;
    --orange-col: #FF6B001C;
    --blue: #0066CC;
    --gray-light: #f7f7f7;
    --gray-medium: #888888;
    --gray-dark: #333333;
    --white: #ffffff;
    --border-radius: 8px;
    --transition: 0.25s ease;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: var(--gray-light);
}

.alert-banner {
    background: var(--blue);
    color: #fff;
    padding: 12px;
    text-align: center;
    font-weight: bold;
	display: none;
}

.container {
    max-width: 600px;
    margin: 30px auto;
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0px 5px 15px rgba(0,0,0,0.1);
    border-top: 5px solid var(--orange);
}

h1 { 
    color: var(--blue); 
    text-align: center; 
    margin: 0; 
    font-size: 24px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 10px; 
}

h1 svg { color: var(--orange); width: 28px; height: 28px; }

.subtitle { text-align: center; color: var(--gray-medium); margin-bottom: 25px; font-size: 14px; }

/* GRILLE DE BOUTONS INDÉPENDANTS */
.problem-grid-independent {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 15px 0;
}

.problem-card { cursor: pointer; display: block; }
.problem-card input { display: none; }

/* CARTES DE CHOIX D'EQUIPEMENT (volet roulant / store banne) */
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 15px 0;
}
.equipment-card { cursor: pointer; display: block; }
.equipment-card input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}
.equipment-card .card-inner {
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.equipment-card .icon-svg svg {
    width: 36px;
    height: 36px;
    margin-bottom: 10px;
    color: var(--gray-medium);
    transition: color 0.2s ease;
}
.equipment-card .card-inner:hover {
    border-color: var(--orange);
    transform: translateY(-2px);
}
.equipment-card .card-title {
    font-weight: bold;
    font-size: 15px;
    color: var(--gray-dark);
    margin-bottom: 4px;
}
.equipment-card .card-desc {
    font-size: 12px;
    color: var(--gray-medium);
}
.equipment-card input:checked + .card-inner {
    background-color: var(--orange-col);
    border-color: var(--orange);
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.25);
}
.equipment-card input:checked + .card-inner .icon-svg svg,
.equipment-card input:checked + .card-inner .card-title {
    color: var(--orange);
}

.card-inner {
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    height: 100%;
    box-sizing: border-box;
}

/* Style des icônes SVG */
.icon-svg svg {
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
    color: var(--gray-medium); /* Gris par défaut */
    transition: color 0.2s ease;
}

.card-inner:hover {
    border-color: var(--orange);
    transform: translateY(-2px);
}

.card-title {
    font-weight: bold;
    font-size: 13px;
    color: var(--gray-dark);
    margin-bottom: 4px;
}

.card-desc {
    font-size: 11px;
    color: var(--gray-medium);
    line-height: 1.3;
}

/* État sélectionné */
.problem-card input:checked + .card-inner {
    background-color: var(--orange-col);
    border-color: var(--orange);
}

.problem-card input:checked + .card-inner .icon-svg svg,
.problem-card input:checked + .card-inner .card-title {
    color: var(--orange); /* L'icône et le titre passent en orange */
}

/* CHAMPS ET AUTRES */
form label { display: block; margin-top: 15px; font-weight: bold; font-size: 14px; }
form input, form textarea, form select {
    width: 100%; padding: 12px; margin-top: 6px; border: 1px solid #ccc;
    border-radius: var(--border-radius); font-size: 15px; box-sizing: border-box;
}

form select {
    appearance: none;
    -webkit-appearance: none;
    background-color: #fff;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 38px;
    cursor: pointer;
}

form input:focus, form textarea:focus, form select:focus {
    border-color: var(--blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.urgent-box { background: #fff0f0; padding: 12px; border-radius: 8px; margin-top: 20px; }

.toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.slider {
    width: 42px; height: 22px; background: #d1d5db; border-radius: 999px;
    position: relative; transition: .25s;
}
.slider::before {
    content:""; position: absolute; width: 18px; height: 18px;
    background: white; border-radius: 50%; top: 2px; left: 2px; transition: .25s;
}
.toggle input:checked + .slider { background: #27ae60; }
.toggle input:checked + .slider::before { transform: translateX(20px); }

button {
    margin-top: 25px; width: 100%; background: var(--orange); color: white;
    padding: 14px; font-size: 17px; border-radius: 8px;
    border: none; font-weight: bold; cursor: pointer;
}

button:hover { background-color: var(--orange-dark); }

.row { display: flex; gap: 10px; }

/* WRAPPER INTERVENTION URGENTE */
.urgent-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    padding: 16px;
    border-radius: var(--border-radius);
    border: 1px solid #e9ecef;
    margin-top: 25px;
    transition: all 0.3s ease;
}

/* Changement de style quand coché (via JS ou CSS parent-sibling) */
.urgent-wrapper:has(input:checked) {
    background: #fff5f5;
    border-color: #feb2b2;
}

.urgent-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.urgent-icon {
    font-size: 20px;
}

.urgent-texts {
    display: flex;
    flex-direction: column;
}

.urgent-title {
    font-weight: bold;
    font-size: 14px;
    color: var(--gray-dark);
}

.urgent-subtitle {
    font-size: 11px;
    color: var(--gray-medium);
}

/* LE SWITCH PRO */
.pro-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.pro-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.pro-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e0;
    transition: .4s;
    border-radius: 34px;
}

.pro-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .pro-slider {
    background-color: #e53e3e; /* Rouge pro */
}

input:focus + .pro-slider {
    box-shadow: 0 0 1px #e53e3e;
}

input:checked + .pro-slider:before {
    transform: translateX(24px);
}

.gap1 {
    display: flex;
    align-items: center; /* Aligne l'icône avec le bloc de texte */
    gap: 0.75rem;
    margin-bottom: 15px;
}

/* Le fond rond orange autour de l'icône */
.icon-circle {
    background-color: var(--orange);
    width: 40px;
    height: 40px;
    border-radius: 50%; /* Rend le fond parfaitement rond */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* Empêche le cercle de s'écraser */
}

/* Alignement du texte sur deux lignes */
.label-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.main-label {
    margin: 0 !important; /* Enlève les marges par défaut */
    font-weight: bold;
    font-size: 15px;
    color: var(--gray-dark);
}

.note {
    margin: 0 !important;
    font-size: 12px;
    color: var(--gray-medium);
}

@media (max-width: 600px) {
  .container {
    padding: 10px;
  }
}

@media (max-width: 500px) {
    .problem-grid-independent { grid-template-columns: 1fr; }
    .row { flex-direction: column; gap: 0; }
}
/* CRENEAUX D'INTERVENTION */
.slot-status {
    font-size: 13px;
    color: var(--gray-medium);
    margin: 8px 0;
    font-style: italic;
}
.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    margin: 10px 0 5px;
}
.slot-btn {
    position: relative;
    padding: 10px 6px;
    border: 1.5px solid #ddd;
    border-radius: var(--border-radius);
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-dark);
    cursor: pointer;
    transition: all 0.2s ease;
}
.slot-btn:hover:not(:disabled) {
    border-color: var(--orange);
    transform: translateY(-2px);
}
.slot-btn.slot-optimise {
    border-color: #2f9e44;
    background: #f0fdf4;
    color: #1a6b34;
}
.slot-btn.slot-selected {
    background: var(--orange);
    border-color: var(--orange);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.35);
}
.slot-btn.slot-indisponible {
    background: #f5f5f5;
    color: #bbb;
    border-color: #eee;
    cursor: not-allowed;
    text-decoration: line-through;
}
.slot-badge { font-size: 11px; }

/* PARCOURS EN ETAPES */
.stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 25px 0 30px;
}
.stepper-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--gray-medium);
}
.stepper-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #eee;
    color: var(--gray-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.25s ease;
}
.stepper-item.active .stepper-circle {
    background: var(--orange);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.35);
}
.stepper-item.done .stepper-circle {
    background: var(--blue);
    color: #fff;
}
.stepper-item.active .stepper-label { color: var(--orange); font-weight: bold; }
.stepper-label { font-size: 11.5px; white-space: nowrap; }
.stepper-line {
    width: 40px;
    height: 2px;
    background: #eee;
    margin: 0 6px 18px;
}

.form-step { animation: fadeInStep 0.25s ease; }
@keyframes fadeInStep {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 25px;
}
.step-nav button { margin: 0; }
.btn-step-next {
    background: var(--orange);
    color: #fff;
    border: none;
    padding: 13px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-left: auto;
}
.btn-step-next:hover { background: var(--orange-dark); }
.btn-step-prev {
    background: none;
    border: none;
    color: var(--gray-medium);
    font-size: 14px;
    cursor: pointer;
    padding: 13px 10px;
}
.btn-step-prev:hover { color: var(--gray-dark); }

/* PRIX DETERMINE PAR SOBASO */
.price-display {
    margin: 12px 0;
    padding: 14px 16px;
    background: #fff7f0;
    border: 1.5px solid #ffd9b3;
    border-radius: 8px;
    font-size: 15px;
    color: var(--gray-dark);
}
.price-display strong { color: var(--orange-dark); font-size: 18px; }
.price-detail { font-size: 12.5px; color: var(--gray-medium); }
.price-note {
    margin-top: 6px;
    font-size: 11.5px;
    color: var(--gray-medium);
    line-height: 1.4;
}

/* DIAGNOSTIC DYNAMIQUE */
.diagnostic-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 8px 0 4px;
}
.diagnostic-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border: 1.5px solid #e5e5e5;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 14px;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.diagnostic-option:hover { border-color: var(--orange); }
.diagnostic-option input[type="radio"] { accent-color: var(--orange); width: 16px; height: 16px; }
.diagnostic-option:has(input:checked) { border-color: var(--orange); background: #fff7f0; }
