/* ============================================
   COMAF - Bouton Flottant Animé
   ============================================ */

/* Container principal */
#comaf-floating-container {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Positions du bouton */
.comaf-floating-bottom-right {
    bottom: 30px;
    right: 30px;
}

.comaf-floating-bottom-left {
    bottom: 30px;
    left: 30px;
}

.comaf-floating-top-right {
    top: 100px;
    right: 30px;
}

.comaf-floating-top-left {
    top: 100px;
    left: 30px;
}

/* Bouton principal */
.comaf-floating-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 60px;
    height: 60px;
    padding: 0;
    background: linear-gradient(135deg, #FF8C00 0%, #FF6B00 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255, 140, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
    animation: comaf-float-in 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.comaf-floating-btn:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 24px rgba(255, 140, 0, 0.6);
}

.comaf-floating-btn:active {
    transform: translateY(-2px) scale(1.02);
}

/* Animation d'entrée */
@keyframes comaf-float-in {
    0% {
        opacity: 0;
        transform: translateY(100px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Contenu du bouton */
.comaf-btn-content {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 2;
}

.comaf-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.comaf-btn-icon svg {
    width: 28px;
    height: 28px;
    animation: comaf-star-pulse 2s ease-in-out infinite;
}

.comaf-btn-text {
    display: none;
}

@keyframes comaf-star-pulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.2) rotate(180deg);
    }
}

.comaf-btn-text {
    white-space: nowrap;
    font-size: 15px;
    letter-spacing: 0.3px;
}

/* Effet de pulse autour du bouton */
.comaf-btn-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50px;
    background: rgba(102, 126, 234, 0.4);
    animation: comaf-pulse-wave 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    pointer-events: none;
}

@keyframes comaf-pulse-wave {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Modale */
.comaf-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999998;
    display: none;
    align-items: center;
    justify-content: center;
}

.comaf-modal.active {
    display: flex;
}

.comaf-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: comaf-fade-in 0.3s ease-out;
}

@keyframes comaf-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.comaf-modal-content {
    position: relative;
    background: white;
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
    animation: comaf-slide-up 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes comaf-slide-up {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Bouton fermer */
.comaf-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.comaf-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg);
}

.comaf-modal-close svg {
    width: 20px;
    height: 20px;
    color: #666;
}

/* Header de la modale */
.comaf-modal-header {
    text-align: center;
    padding: 40px 40px 30px;
    background: linear-gradient(135deg, #FF8C00 0%, #FF6B00 100%);
    color: white;
    border-radius: 24px 24px 0 0;
}

.comaf-modal-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: comaf-icon-bounce 1s ease-in-out infinite;
}

@keyframes comaf-icon-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.comaf-modal-icon svg {
    width: 32px;
    height: 32px;
}

.comaf-modal-header h3 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 700;
}

.comaf-modal-header p {
    margin: 0;
    font-size: 15px;
    opacity: 0.95;
}

/* Formulaire */
.comaf-modal-form {
    padding: 30px 40px 40px;
}

.comaf-form-group {
    margin-bottom: 24px;
}

.comaf-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.comaf-form-group input[type="text"],
.comaf-form-group input[type="email"],
.comaf-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.comaf-form-group input:focus,
.comaf-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.comaf-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Notation étoiles */
.comaf-star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 25px;
    font-size: 200px;
    margin: 12px 0;
}

.comaf-star-rating input[type="radio"] {
    display: none;
}

.comaf-star-rating label {
    cursor: pointer;
    color: transparent;
    -webkit-text-stroke: 3px #CBD5E0;
    text-stroke: 3px #CBD5E0;
    transition: all 0.3s ease;
    margin: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.comaf-star-rating label:hover,
.comaf-star-rating label:hover ~ label {
    color: #FF8C00;
    -webkit-text-stroke: 0;
    text-stroke: 0;
    transform: scale(1.2);
    filter: drop-shadow(0 4px 12px rgba(255, 140, 0, 0.5));
}

.comaf-star-rating input[type="radio"]:checked ~ label {
    color: #FFD700;
    -webkit-text-stroke: 0;
    text-stroke: 0;
    transform: scale(2);
    animation: comaf-star-select 0.4s ease-int;
    filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.6));
}

@keyframes comaf-star-select {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3) rotate(10deg);
    }
    100% {
        transform: scale(1);
    }
}

.comaf-rating-text {
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    min-height: 24px;
    margin-top: 10px;
    color: #FF8C00;
}

/* Actions du formulaire */
.comaf-form-actions {
    margin-top: 24px;
}

/* Bouton submit */
.comaf-submit-btn {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, #FF8C00 0%, #FF6B00 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
}

.comaf-submit-btn .comaf-btn-text {
    display: block;
}

.comaf-submit-btn .comaf-btn-loader {
    display: none;
}

.comaf-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 140, 0, 0.5);
}

.comaf-submit-btn:active {
    transform: translateY(0);
}

.comaf-submit-btn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
}

/* Loader */
.comaf-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: comaf-spin 0.8s linear infinite;
}

@keyframes comaf-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Messages */
.comaf-form-message {
    padding: 16px;
    border-radius: 12px;
    margin-top: 20px;
    font-weight: 500;
    text-align: center;
    animation: comaf-fade-in 0.3s ease-out;
}

.comaf-form-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 2px solid #10b981;
}

.comaf-form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid #ef4444;
}

.comaf-form-message.info {
    background: #dbeafe;
    color: #1e40af;
    border: 2px solid #3b82f6;
}

/* Page de succès Google */
.comaf-google-success {
    padding: 40px;
    text-align: center;
}

.comaf-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: comaf-success-pop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes comaf-success-pop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.comaf-success-icon svg {
    width: 48px;
    height: 48px;
    color: white;
}

.comaf-google-success h3 {
    font-size: 24px;
    color: #1a202c;
    margin: 0 0 12px;
    font-weight: 700;
}

.comaf-google-success > p {
    font-size: 16px;
    color: #4a5568;
    margin: 0 0 30px;
    line-height: 1.6;
}

.comaf-review-summary {
    background: #f7fafc;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    border: 2px solid #e2e8f0;
}

.comaf-review-stars {
    font-size: 32px;
    color: #FF8C00;
    margin-bottom: 12px;
    letter-spacing: 4px;
}

.comaf-review-name {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 12px;
}

.comaf-review-comment {
    font-size: 14px;
    color: #4a5568;
    font-style: italic;
    line-height: 1.6;
}

.comaf-google-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comaf-google-btn {
    width: 100%;
    padding: 18px 24px;
    background: white;
    color: #1a202c;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.comaf-google-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: #FF8C00;
}

.comaf-google-btn svg {
    flex-shrink: 0;
}

.comaf-later-btn {
    width: 100%;
    padding: 14px 24px;
    background: transparent;
    color: #718096;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.comaf-later-btn:hover {
    background: #f7fafc;
    color: #4a5568;
}

/* Responsive */
@media (max-width: 768px) {
    .comaf-floating-bottom-right,
    .comaf-floating-bottom-left {
        bottom: 20px;
    }
    
    .comaf-floating-bottom-right {
        right: 20px;
    }
    
    .comaf-floating-bottom-left {
        left: 20px;
    }
    
    .comaf-floating-btn {
        padding: 14px 20px;
        font-size: 14px;
    }
    
    .comaf-btn-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .comaf-modal-content {
        width: 95%;
        border-radius: 20px;
    }
    
    .comaf-modal-header {
        padding: 30px 20px 20px;
    }
    
    .comaf-modal-form {
        padding: 20px;
    }
    
    .comaf-star-rating {
        font-size: 90px;
        gap: 18px;
    }
    

    .comaf-google-success {
        padding: 20px;
    }
}

/* Styles pour le bouton Google premium */
.comaf-google-btn-premium:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4) !important;
}

.comaf-google-btn-premium:active {
    transform: translateY(-1px) scale(1.02);
}

.comaf-later-btn:hover {
    background: #f5f5f5 !important;
    border-color: #bbb !important;
    color: #666 !important;
}

@media (max-width: 480px) {
    .comaf-btn-text {
        display: none;
    }
    
    .comaf-floating-btn {
        width: 56px;
        height: 56px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
    
    .comaf-btn-pulse {
        border-radius: 50%;
    }
}

/* Animation shake pour attirer l'attention */
@keyframes comaf-shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-4px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(4px);
    }
}

.comaf-floating-btn.shake {
    animation: comaf-shake 0.6s ease-in-out;
}

