@charset "UTF-8";
/**
 * Styles pour la page Constitution SCI
 * Version complète optimisée et corrigée
 * Alignement parfait des champs et responsive design
 * AVEC HARMONISATION MOBILE SASU
 */

/* ===== RESET ET BASE ===== */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Classes utilitaires pour la détection d'appareil */
body.is-mobile,
body.is-tablet {
    -webkit-tap-highlight-color: transparent;
}

/* ===== HERO SECTION COMPACT ===== */
.hero-sci-compact {
    background: linear-gradient(135deg, #f5f5fe 0%, #e8e8fb 100%);
    padding: 3rem 0;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    color: #000091;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-align: center;
}

.hero-description {
    color: #3a3a3a;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    text-align: justify;
}

.hero-description-intro {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* ===== PRICE BANNER ===== */
.price-banner {
    background: #000091;
    color: white;
    padding: 2rem;
    margin: -2rem -2rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 0;
    position: relative;
}

.price-banner-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.price-banner-amount {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.price-banner-subtitle {
    font-size: 0.875rem;
    font-weight: 400;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Prix link */
.price-link {
    color: white !important;
    text-decoration: none !important;
    opacity: 0.9;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    position: relative;
    border: none !important;
    outline: none;
}

.price-link span {
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.price-link:hover {
    opacity: 1;
}

.price-link:hover span {
    border-bottom-color: white;
}

.price-link:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

.price-link svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Supprimer toute icône automatique */
.price-banner a::after,
.price-banner a::before,
.price-banner-subtitle a::after,
.price-banner-subtitle a::before {
    display: none !important;
    content: none !important;
}

.price-banner-info {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.price-banner-ttc {
    font-size: 1.75rem;
    font-weight: 600;
}

.price-banner-info small {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Badge "Tarif réglementé" */
.price-banner::before {
    content: "TARIF RÉGLEMENTÉ";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #e1000f;
    color: white;
    padding: 0.375rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    border-radius: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border: 1px solid #c60e13;
    display: inline-block;
    line-height: 1;
}

/* ===== EMAIL CAPTURE SECTION ===== */
.email-capture-section {
    background: #f8f8fb;
    padding: 1.5rem;
    margin: -2rem -2rem 2rem;
    border-bottom: 2px solid #e0e0e0;
}

.email-capture-section .form-group {
    margin-bottom: 0;
}

.email-capture-section .form-help {
    font-size: 0.75rem;
    color: #666;
    line-height: 1.4;
    margin-top: 0.5rem;
}

.email-capture-section .form-help a {
    color: #000091;
    text-decoration: underline;
    display: inline;
    position: relative;
}

.email-capture-section .form-help a:hover {
    color: #1212ff;
}

.email-capture-section .form-help a::after,
.email-capture-section .form-help a::before,
.email-capture-section a[target="_blank"]::after {
    display: none !important;
    content: none !important;
}

/* Gestion des textes desktop/mobile */
.desktop-text {
    display: inline;
}

.mobile-text {
    display: none;
}

/* ===== FORM CONTAINER ===== */
.form-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 2rem;
}

.form-header {
    border-bottom: 3px solid #000091;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.form-header h2 {
    color: #000091;
    margin: 0;
}

.form-step {
    margin-bottom: 3rem;
    animation: fadeIn 0.3s ease-out;
}

.form-step-header {
    background: #f5f5fe;
    padding: 1rem 1.5rem;
    margin: -2rem -2rem 2rem;
    border-left: 4px solid #000091;
}

.form-step-header h3 {
    color: #000091;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.step-number {
    background: #000091;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ===== ALIGNEMENT PARFAIT DES CHAMPS (HARMONISÉ AVEC SASU) ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    color: #161616;
    font-weight: 600;
    margin-bottom: 0.5rem;
    min-height: 24px;
}

.form-group .required {
    color: #ce614a;
}

/* Hauteur uniforme pour TOUS les champs */
.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    line-height: 1.4;
}

/* Style spécifique pour les champs readonly */
.form-control[readonly],
.form-control:read-only {
    background-color: #f5f5f5;
    cursor: not-allowed;
    padding: 0.75rem;
}

/* Style spécifique pour les select avec flèche visible */
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    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='%23333' 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 0.75rem center;
    background-size: 1.2em;
    padding-right: 2.5rem;
    cursor: pointer;
}

/* Assurer la même hauteur pour tous les types d'inputs */
input[type="date"].form-control,
input[type="text"].form-control,
input[type="number"].form-control,
input[type="email"].form-control,
input[type="tel"].form-control,
select.form-control {
    height: 48px;
    box-sizing: border-box;
}

/* S'assurer que les inputs readonly ont aussi la bonne hauteur */
input[type="text"].form-control[readonly] {
    height: 48px;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

/* Ajustement spécifique pour les select pour éviter la coupure du texte */
select.form-control {
    line-height: 1.2;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

/* Ajustement pour les inputs text pour un meilleur alignement vertical */
input[type="text"].form-control,
input[type="number"].form-control,
input[type="email"].form-control,
input[type="tel"].form-control,
input[type="date"].form-control {
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

/* Exception pour les textarea qui doivent garder leur hauteur automatique */
textarea.form-control {
    height: auto;
    min-height: 50px;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    resize: vertical;
}

/* NOUVEAU : Exception pour l'objet social - une seule ligne */
#objet {
    min-height: 50px !important;
    height: 50px !important;
}

.form-control:focus {
    outline: none;
    border-color: #000091;
    box-shadow: 0 0 0 3px rgba(0, 0, 145, 0.1);
}

/* États de validation */
.form-control.error {
    border-color: #ce614a;
}

.form-control.valid {
    border-color: #18753c;
}

/* Override du curseur interdit sur select error */
select.form-control.error {
    cursor: pointer !important;
}

/* Messages d'aide et d'erreur */
.form-help {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.25rem;
}

.form-error {
    font-size: 0.875rem;
    color: #ce614a;
    margin-top: 0.25rem;
    display: none;
}

.form-control.error + .form-error {
    display: block;
}

.form-success {
    font-size: 0.875rem;
    color: #18753c;
    margin-top: 0.25rem;
    display: none;
}

.form-control.valid ~ .form-success {
    display: block;
}

/* Placeholders */
.form-control::placeholder {
    color: #999;
    font-style: italic;
}

.form-control:focus::placeholder {
    opacity: 0.5;
}

/* ===== GRILLES RESPONSIVES ===== */
.fr-grid-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.fr-grid-row--gutters {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

.fr-grid-row--gutters > [class^="fr-col"] {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* Dans une grille, réduire l'espace */
.fr-grid-row .form-group {
    margin-bottom: 1rem;
}

/* ===== RADIO & CHECKBOX ===== */
.form-radio-group,
.form-checkbox-group {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.form-radio,
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.form-radio input[type="radio"],
.form-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* ===== SECTIONS SPECIFIQUES ===== */
.clause-section {
    background: #f8f8f8;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 3px solid #000091;
}

.clause-section h4 {
    color: #000091;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.associe-section {
    background: #f8f8f8;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 2px solid #e0e0e0;
    position: relative;
    animation: slideDown 0.3s ease-out;
}

.associe-section.highlight {
    border-color: #000091;
    background: #f5f5fe;
}

.associe-section h4,
.gerant-section h4 {
    color: #000091;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.associe-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.remove-associe-btn {
    background: #e1000f;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.remove-associe-btn:hover {
    background: #c60e13;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.add-associe-btn {
    background: #18753c;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.add-associe-btn:hover {
    background: #0f5929;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.gerant-section {
    background: #f8f8f8;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.cogerant-section {
    background: #f8f8f8;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #e0e0e0;
}

/* Parts sociales */
.parts-sociales-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e0e0e0;
}

.parts-sociales-section h5 {
    color: #000091;
    margin-bottom: 1rem;
}

.parts-pourcentage {
    text-align: center;
    padding: 0.75rem;
    background: #e3e3fd;
    border-radius: 4px;
    margin-top: 1rem;
}

.pourcentage-value {
    font-weight: 700;
    color: #000091;
    font-size: 1.1rem;
}

/* ===== ALERTS ===== */
.info-alert,
.warning-alert {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-alert {
    background-color: #e3e3fd;
    border-left: 4px solid #000091;
}

.warning-alert {
    background-color: #fff4e5;
    border-left: 4px solid #fc5d00;
}

.info-alert-icon,
.warning-alert-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

.info-alert-content,
.warning-alert-content {
    flex: 1;
}

.info-alert-content p,
.warning-alert-content p {
    margin: 0;
    font-size: 0.875rem;
    color: #161616;
}

/* ===== CAPITAL CALCULATOR ===== */
.capital-calculator {
    background: #f8f8f8;
    padding: 1.5rem;
    border-radius: 4px;
    margin: 1rem 0;
}

.capital-calculator h4 {
    color: #000091;
    margin-bottom: 1rem;
}

.capital-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.capital-result {
    font-size: 1.25rem;
    font-weight: 700;
    color: #000091;
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 4px;
}

.nature-details-section {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f8f8;
    border-radius: 4px;
    border-left: 3px solid #000091;
}

.nature-details-section h5 {
    color: #000091;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

/* ===== INFO TOOLTIPS ===== */
.info-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
    cursor: help;
    position: relative;
    vertical-align: middle;
    width: 18px;
    height: 18px;
    background: #e3e3fd;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
}

.info-tooltip::before {
    content: "?";
    font-size: 12px;
    font-weight: 600;
    color: #000091;
    line-height: 1;
}

.info-tooltip:hover {
    background: #000091;
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0, 0, 18, 0.15);
}

.info-tooltip:hover::before {
    color: white;
}

.info-tooltip svg {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

/* Tooltip desktop */
.tooltip-content {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: #161616;
    padding: 1.25rem;
    border-radius: 12px;
    font-size: 0.875rem;
    line-height: 1.5;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15), 0 3px 10px rgba(0,0,0,0.1);
    border: 2px solid #000091;
    min-width: 280px;
    max-width: 320px;
    font-weight: normal;
    white-space: normal;
    pointer-events: none;
}

.tooltip-content strong {
    color: #000091;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 0.25rem;
}

.tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid white;
}

.tooltip-content::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 12px solid #000091;
    margin-top: -2px;
}

.info-tooltip:hover .tooltip-content,
.info-tooltip:focus-within .tooltip-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
    pointer-events: auto;
}

.info-tooltip:focus {
    background: #000091;
    box-shadow: 0 0 0 3px rgba(0, 0, 145, 0.25);
    outline: none;
}

.info-tooltip:focus::before {
    color: white;
}

/* ===== MODAL MOBILE POUR TOOLTIPS ===== */
.tooltip-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

.tooltip-modal-overlay.active {
    display: flex;
}

.tooltip-modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    max-width: min(90vw, 400px);
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    position: relative;
    animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 3px solid #000091;
}

.tooltip-modal-header {
    background: linear-gradient(135deg, #000091 0%, #1212ff 100%);
    color: white;
    padding: 1.25rem 3.5rem 1.25rem 1.5rem;
    position: relative;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tooltip-modal-body {
    padding: 1.75rem 1.5rem;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
    font-size: 0.95rem;
    line-height: 1.65;
    color: #333;
}

.tooltip-modal-body strong {
    color: #000091;
    font-weight: 600;
    display: block;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.tooltip-modal-body strong:first-child {
    margin-top: 0;
}

.tooltip-modal-close {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    background: white;
    color: #e1000f;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    line-height: 0;
    padding: 0;
}

.tooltip-modal-close:hover {
    background: #fef4f4;
    color: #c60e13;
    transform: translateY(-50%) scale(1.05);
}

.tooltip-modal-close:active {
    transform: translateY(-50%) scale(0.95);
}

/* ===== PREVIEW CARD ===== */
.preview-card {
    background: white;
    border: 2px solid #000091;
    border-radius: 8px;
    position: sticky;
    top: 2rem;
    overflow: hidden;
    padding: 0;
    max-width: 400px;
    margin: 0 auto;
}

.sidebar-card.preview-card {
    padding: 0;
}

.preview-header {
    background: #000091;
    color: white;
    padding: 1rem 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-header h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    color: white !important;
    font-size: 1.125rem;
}

.preview-header svg {
    color: white !important;
    fill: white !important;
    stroke: white !important;
}

.preview-content {
    background: white;
    padding: 1.2rem;
    border-radius: 8px;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.8rem;
    line-height: 1.35;
    max-height: 600px;
    overflow-y: auto;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
    position: relative;
    text-align: left;
    color: #333;
    max-width: 100%;
}

.preview-title {
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.preview-text {
    margin-bottom: 1.25rem;
    text-align: left;
}

.preview-annonce {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #333;
    text-align: left;
}

.preview-annonce-denomination {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.preview-annonce-text {
    margin-bottom: 0.3rem;
    text-align: justify;
    text-justify: inter-word;
}

.preview-annonce-text strong {
    font-weight: 600;
}

.preview-annonce span[id^="preview-"] {
    background: transparent !important;
    color: inherit !important;
    padding: 0 !important;
    font-weight: inherit !important;
}

.preview-signature {
    text-align: right;
    font-style: italic;
    margin-top: 2rem;
    font-size: 0.9rem;
}

.preview-footer {
    margin-top: 1rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e0e0e0;
    font-size: 0.75rem;
    color: #666;
    font-style: italic;
}

.preview-content span[id^="preview-"] {
    background: #f0f0f0;
    color: #666;
    padding: 0 4px;
    border-radius: 2px;
    font-weight: 600;
}

.preview-content span[id^="preview-"].filled {
    background: transparent;
    color: inherit;
    padding: 0;
    font-weight: normal;
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: sticky;
    top: 2rem;
}

.sidebar-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-card h4 {
    color: #000091;
    margin-bottom: 1rem;
}

.help-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.help-list svg {
    color: #18753c;
    flex-shrink: 0;
}

/* ===== BOTTOM CTA ===== */
.bottom-cta {
    background: #f5f5fe;
    padding: 2rem;
    margin: 2rem -2rem -2rem;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

.mobile-hide-on-desktop {
    display: block;
}

.mobile-only {
    display: none;
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: #000091 !important;
    background-color: #000091 !important;
    color: white !important;
    padding: 0.75rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: #1212ff !important;
    background-color: #1212ff !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-primary:disabled {
    background: #929292 !important;
    background-color: #929292 !important;
    color: white !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: white;
    color: #000091;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid #000091;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #f5f5fe;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        transform: translateY(30px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* ===== SAVE NOTIFICATION ===== */
.save-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #18753c;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
}

#save-indicator {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #18753c;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    display: none;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ===== TABLETTE RESPONSIVE ===== */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
        padding: 0 1rem;
    }
    
    .fr-container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .price-banner {
        padding: 2rem 1.5rem;
        flex-direction: row;
        gap: 1rem;
    }
    
    .price-banner-amount {
        font-size: 2rem;
    }
    
    .price-banner-ttc {
        font-size: 1.5rem;
    }
    
    .fr-col-12.fr-col-lg-8,
    .fr-col-12.fr-col-lg-4 {
        width: 100%;
    }
    
    .fr-col-12.fr-col-lg-4 {
        padding-left: 0 !important;
        margin-top: 2rem;
    }
    
    .sidebar {
        position: static !important;
    }
    
    .sidebar-card.preview-card {
        position: static !important;
        max-width: 100%;
        margin: 0 auto 2rem;
    }
    
    .form-container {
        padding: 1.5rem;
    }
    
    .capital-inputs {
        grid-template-columns: 1fr;
    }
    
    @media (max-width: 900px) {
        .form-radio-group,
        .form-checkbox-group {
            flex-direction: column;
            gap: 1rem;
        }
        
        .form-radio,
        .form-checkbox {
            padding: 0.75rem;
            background: #f8f8f8;
            border-radius: 4px;
            margin-bottom: 0.5rem;
        }
    }
    
    .clause-section,
    .associe-section,
    .gerant-section {
        padding: 1.25rem;
    }
    
    .info-tooltip {
        width: 24px;
        height: 24px;
        padding: 0;
    }
    
    .info-tooltip::before {
        font-size: 14px;
    }
    
    .tooltip-content {
        display: none !important;
    }
}

/* ===== MOBILE RESPONSIVE (HARMONISÉ AVEC SASU) ===== */
@media (max-width: 767px) {
    .desktop-text {
        display: none;
    }
    
    .mobile-text {
        display: inline;
    }
    
    .email-capture-section .form-help {
        font-size: 0.7rem;
    }
    
    /* Structure principale */
    main {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
        min-height: calc(100vh - 100px);
    }
    
    body {
        padding-bottom: 0 !important;
    }
    
    .fr-container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }
    
    .fr-grid-row {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
        display: flex;
        flex-direction: column;
        min-height: 100%;
    }
    
    .fr-col-12.fr-col-lg-8 {
        order: 1;
        padding: 0 !important;
        flex: 0 0 auto;
    }
    
    .fr-col-12.fr-col-lg-4 {
        order: 2;
        padding: 0 !important;
        margin: 0 !important;
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        min-height: 200px;
    }
    
    .sidebar {
        display: flex !important;
        flex-direction: column;
        position: static !important;
        margin: 2rem 0 0 0 !important;
        padding: 0 !important;
        flex: 1;
        padding-bottom: 100px !important;
    }
    
    .preview-card {
        display: block !important;
        position: static !important;
        max-width: 100% !important;
        margin: 0 0.75rem !important;
        border-radius: 8px;
        border: 2px solid #000091;
        flex: 1 1 auto;
        min-height: 300px;
    }
    
    .preview-content {
        max-height: none !important;
        overflow-y: visible !important;
    }
    
    /* Bouton mobile fixe */
    .bottom-cta.mobile-only {
        display: block !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 1rem 0.75rem !important;
        background: #f5f5fe !important;
        border-top: 1px solid #e0e0e0 !important;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1) !important;
        z-index: 999 !important;
        text-align: center;
    }
    
    .bottom-cta.mobile-only .btn-primary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 1rem 1.5rem !important;
        font-size: 1rem !important;
    }
    
    .bottom-cta.mobile-only p {
        margin-top: 0.5rem !important;
        margin-bottom: 0 !important;
        font-size: 0.75rem !important;
        padding: 0 0.5rem;
    }
    
    /* Hero section */
    .hero-sci-compact {
        padding: 2rem 1rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
        line-height: 1.3;
        margin-bottom: 1rem;
        padding: 0 0.5rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
        text-align: left;
        padding: 0 0.5rem;
    }
    
    /* Price banner */
    .price-banner {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 2.5rem 1.5rem 2rem;
        margin: -1rem -1rem 1.5rem;
        border-radius: 0;
    }
    
    .price-banner::before {
        font-size: 0.7rem;
        padding: 0.3rem 1rem;
    }
    
    .price-banner-left {
        align-items: center;
    }
    
    .price-banner-info {
        text-align: center;
        align-items: center;
    }
    
    .price-banner-amount {
        font-size: 1.75rem;
    }
    
    .price-banner-ttc {
        font-size: 1.25rem;
    }
    
    .price-banner-subtitle {
        font-size: 0.8rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Email capture */
    .email-capture-section {
        padding: 1rem;
        margin: -1rem -1rem 1.5rem;
    }
    
    /* Form container */
    .form-container {
        padding: 1rem;
        border-radius: 0;
        box-shadow: none;
        background: white;
    }
    
    .form-step {
        margin-bottom: 2rem;
    }
    
    .form-step-header {
        margin: -1rem -1rem 1.5rem;
        padding: 1rem;
    }
    
    .form-step-header h3 {
        font-size: 1.1rem;
        flex-wrap: wrap;
    }
    
    .step-number {
        width: 25px;
        height: 25px;
        font-size: 0.9rem;
    }
    
    /* Form fields mobile - HARMONISÉ AVEC SASU */
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .form-group label {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
    }
    
    .info-tooltip {
        width: 24px;
        height: 24px;
        padding: 0;
        margin: -0.25rem 0 -0.25rem 0.5rem;
        touch-action: manipulation;
    }
    
    .info-tooltip::before {
        font-size: 14px;
    }
    
    /* IMPORTANT: Hauteurs mobile harmonisées avec SASU */
    .form-control {
        font-size: 16px; /* Empêche le zoom sur iOS */
        padding: 0.875rem;
        border-radius: 6px;
        -webkit-appearance: none;
    }
    
    /* Hauteur augmentée pour meilleure ergonomie tactile comme SASU */
    input[type="date"].form-control,
    input[type="text"].form-control,
    input[type="number"].form-control,
    input[type="email"].form-control,
    input[type="tel"].form-control,
    select.form-control {
        height: 52px;
        font-size: 16px;
    }
    
    textarea.form-control {
        min-height: 100px;
        font-size: 16px;
    }
    
    /* Objet social sur mobile */
    #objet {
        min-height: 52px !important;
        height: 52px !important;
    }
    
    /* Radio et checkbox mobile */
    .form-radio-group,
    .form-checkbox-group {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .form-radio,
    .form-checkbox {
        padding: 1rem;
        background: #f8f8f8;
        border-radius: 6px;
        margin-bottom: 0.5rem;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    
    .form-radio input[type="radio"],
    .form-checkbox input[type="checkbox"] {
        width: 24px;
        height: 24px;
        flex-shrink: 0;
    }
    
    /* Info alerts mobile */
    .info-alert,
    .warning-alert {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .info-alert-icon,
    .warning-alert-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 0.5rem;
    }
    
    /* Capital calculator mobile */
    .capital-calculator {
        padding: 1rem;
        margin: 0.75rem 0;
        border-radius: 8px;
    }
    
    .capital-inputs {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .capital-result {
        font-size: 1.1rem;
        padding: 0.75rem;
    }
    
    /* Sections mobile */
    .clause-section,
    .associe-section,
    .gerant-section {
        padding: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .clause-section h4,
    .associe-section h4,
    .gerant-section h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .associe-section h4 {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .remove-associe {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
    
    .add-associe-btn,
    .remove-associe-btn {
        display: none !important;
    }
    
    .form-container .bottom-cta {
        display: none !important;
    }
    
    /* Grilles mobiles */
    .fr-grid-row--gutters > [class^="fr-col"] {
        flex: 0 0 100%;
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }
    
    /* Corrections overflow */
    html, body {
        overflow-x: hidden !important;
        max-width: 100% !important;
    }
    
    main {
        max-width: 100vw !important;
    }
    
    .form-container {
        padding-top: 2rem !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .price-banner,
    .email-capture-section,
    .form-step-header {
        margin-left: -0.75rem !important;
        margin-right: -0.75rem !important;
        width: calc(100% + 1.5rem) !important;
    }
    
    .price-banner {
        overflow: visible !important;
        margin-top: 0 !important;
    }
    
    /* Masquer tooltips desktop */
    .tooltip-content {
        display: none !important;
    }
    
    /* Save indicator mobile */
    #save-indicator {
        bottom: 7rem;
        right: 1rem;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    /* Nature details mobile */
    .nature-details-section {
        margin-top: 1rem;
        padding: 1rem;
        margin-left: 0;
        margin-right: 0;
        border-radius: 8px;
    }
    
    /* Amélioration lisibilité */
    .form-help {
        font-size: 0.8rem;
        line-height: 1.4;
        margin-top: 0.3rem;
    }
    
    .form-error {
        font-size: 0.85rem;
        padding: 0.3rem 0;
        font-weight: 500;
    }
    
    /* Masquer scroll to top */
    .back-to-top,
    .scroll-to-top,
    [class*="to-top"],
    [class*="scroll-top"] {
        display: none !important;
    }
    
    /* Corrections des paddings sur mobile */
    .form-control[readonly],
    .form-control:read-only {
        padding: 0.875rem !important;
    }
    
    /* Responsive colonnes */
    @media (min-width: 768px) {
        .fr-col-12.fr-col-sm-6 {
            flex: 0 0 50%;
            max-width: 50%;
        }
        
        .fr-col-12.fr-col-sm-4 {
            flex: 0 0 33.333333%;
            max-width: 33.333333%;
        }
        
        .fr-col-12.fr-col-sm-8 {
            flex: 0 0 66.666667%;
            max-width: 66.666667%;
        }
        
        .fr-col-12.fr-col-sm-3 {
            flex: 0 0 25%;
            max-width: 25%;
        }
        
        .fr-col-12.fr-col-sm-5 {
            flex: 0 0 41.666667%;
            max-width: 41.666667%;
        }
        
        .fr-col-md-2 {
            flex: 0 0 16.666667%;
            max-width: 16.666667%;
        }
        
        .fr-col-md-5 {
            flex: 0 0 41.666667%;
            max-width: 41.666667%;
        }
        
        .fr-col-md-4 {
            flex: 0 0 33.333333%;
            max-width: 33.333333%;
        }
        
        .fr-col-md-8 {
            flex: 0 0 66.666667%;
            max-width: 66.666667%;
        }
    }
}

/* ===== OPTIMISATIONS TACTILES ===== */
@media (hover: none) and (pointer: coarse) {
    .form-radio,
    .form-checkbox {
        min-height: 48px;
        padding: 12px;
    }
    
    button,
    .btn-primary,
    .btn-secondary {
        min-height: 48px;
    }
    
    .info-tooltip {
        padding: 0.5rem;
        margin: -0.5rem 0 -0.5rem 0.25rem;
    }
    
    .info-tooltip:hover .tooltip-content {
        opacity: 0;
        visibility: hidden;
    }
    
    button:active,
    .btn-primary:active,
    .btn-secondary:active,
    .form-radio:active,
    .form-checkbox:active,
    .info-tooltip:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
}

/* ===== DESKTOP STICKY ADJUSTMENTS ===== */
@media (min-width: 992px) {
    .sidebar-card.preview-card {
        top: 160px !important;
    }
}

/* Fix pour l'icône d'interdiction sur les select error */
select.form-control.error {
    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='%23333' 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") !important;
    cursor: pointer !important;
}

/* Override DSFR pour TOUS les selects avec classe error */
select.form-control.error:not(:focus):not([data-touched="true"]),
.form-control select.error:not(:focus):not([data-touched="true"]) {
    border-color: #ddd !important;
    background-color: #eee !important;
    cursor: pointer !important;
}

/* Afficher l'erreur seulement après interaction */
select.form-control.error[data-touched="true"]:not(:focus) {
    border-color: #ce614a !important;
}

/* Garder la bordure bleue au focus pour tous les selects */
select.form-control:focus {
    border-color: #000091 !important;
}

/* Retirer l'icône de curseur interdit sur tous les selects */
select.form-control {
    cursor: pointer !important;
}

/* ===== PRINT STYLES ===== */
@media print {
    /* Masquer les éléments non nécessaires à l'impression */
    .sidebar,
    .hero-sci-compact,
    .price-banner,
    .bottom-cta,
    .btn-secondary,
    .info-tooltip,
    .mobile-preview-btn,
    .mobile-preview-modal,
    .mobile-sticky-cta,
    .mobile-only,
    .add-associe-btn,
    .remove-associe-btn,
    .back-to-top,
    .scroll-to-top,
    .form-help,
    .form-error,
    .info-alert,
    .warning-alert,
    .preview-card,
    .email-capture-section,
    .progress-bar,
    .save-notification,
    #save-indicator {
        display: none !important;
    }
    
    /* Ajustements pour l'impression */
    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000 !important;
        background: white !important;
    }
    
    .fr-container {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .form-container {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .form-step-header {
        background: none !important;
        border-left: 3px solid #000 !important;
        padding: 0.5rem 0 0.5rem 1rem !important;
        margin: 1rem 0 !important;
        page-break-inside: avoid;
    }
    
    .form-step-header h3 {
        color: #000 !important;
        font-size: 16pt !important;
    }
    
    .form-control {
        border: 1px solid #000 !important;
        background: white !important;
        padding: 0.25rem !important;
        height: auto !important;
        page-break-inside: avoid;
    }
    
    .form-group label {
        font-weight: bold !important;
        color: #000 !important;
    }
    
    .required {
        color: #000 !important;
    }
    
    .form-radio,
    .form-checkbox {
        page-break-inside: avoid;
    }
    
    .form-step,
    .clause-section,
    .associe-section,
    .gerant-section {
        page-break-inside: avoid;
        margin-bottom: 1rem !important;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        page-break-inside: avoid;
    }
    
    .form-group {
        page-break-inside: avoid;
    }
    
    .fr-grid-row {
        page-break-inside: avoid;
    }
    
    a[href]:after {
        content: none !important;
    }
    
    input.form-control,
    select.form-control,
    textarea.form-control {
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    @page {
        margin: 2cm;
        size: A4;
    }
    
    .form-step:first-child {
        margin-top: 0 !important;
    }
    
    .form-step:last-child {
        margin-bottom: 0 !important;
    }
}