/* style.css */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f4f4f4;
    color: #333;
    font-size: 16px;
    text-size-adjust: 100%;
}

.container {
    max-width: 600px;
    margin: 1.5em auto;
    padding: 1em;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

h1,
h2 {
    color: #2c3e50;
    text-align: center;
}

.logo {
    max-width: 200px;
    margin: 2em auto;
    display: block;
}

.description {
    max-width: 600px;
    margin: 2em auto;
    line-height: 1.6;
    color: #333;
}

.btn,
button,
.radio-button {
    display: inline-block;
    padding: 1.5em;
    background: #ecf0f1;
    color: #2c3e50;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box;
    width: 100%;
    margin: 10px auto;
    font-size: 110%;
}

.btn,
button {
    background: #3498db;
    color: white;
}

.btn:hover,
button:hover {
    background: #2980b9;
}

.radio-buttons {
    display: flex;
    gap: 1em;
    margin: 1.5em 0;
}

.center {
    text-align: center;
}
.vote-options {
    display: flex;
    gap: 1em;
    margin: 1.5em 0;
}

label,
p {
    text-align: left;
}

input[type="text"],
input[type="number"],
select,
textarea {
    width: calc(100% - 2em);
    padding: 1em;
    margin-top: 0.5em;
    margin-bottom: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
}
select {
    width: 100%;
}

/* Classes de base pour les résultats */
.result h2,
.share h2 {
    padding: 2em;
    border-radius: 8px;
}
.result .details,
.share .details {
    font-size: 0.9em;
    word-break: break-all;
}
.result h2 .title,
.share h2 .title {
    padding-left: 2em;
    padding-bottom: 1em;
    margin: auto;
    position: relative;
    display: inline-block;
}

.result .title::before,
.url .title::before {
    position: absolute;
    left: 0;
    top: -0.2em;
    font-size: 1.5em;
    content: attr(data-icon);
}

/* Styles par statut */
.unanimous {
    background: #dff0d8; /* Vert pâle */
}
.unanimous .title::before {
    content: "✅";
}

.veto {
    background: #ffccbc; /* Orange pêche */
}
.veto .title::before {
    content: "❗"; /* ❌ */
}

.waiting,
.url {
    background: #e3f2fd; /* Bleu pâle */
}
.js .url {
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.js .url:hover {
    background: #bbdefb; /* Bleu un peu plus foncé au survol */
}
.js .url:active {
    background: #90caf9; /* Bleu encore plus foncé au clic */
}
.url .details {
    text-decoration: underline;
    position: relative;
    word-break: break-all;
    line-height: 1.4;
}
.waiting .title::before {
    content: "🕒"; /*⏳⏱🕒*/
}
.url .title::before {
    content: "📋"; /*
    - 📋 (Presse-papiers)
    - 📎 (Trombone)
    - 🔗 (Lien)
    - 📝 (Mémo) */
}

/* Style pour le message de copie */
.url .details::after {
    content: "URL copiée !";
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #2c3e50;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 100;
    white-space: nowrap;
}
.url .details.copied::after {
    opacity: 1;
    animation: fadeInOut 2s ease forwards;
}

@keyframes fadeInOut {
    0%,
    100% {
        opacity: 0;
    }
    20%,
    80% {
        opacity: 1;
    }
}

.contested {
    background: #ef9a9a;
    color: #5d4037;
}
.contested .title::before {
    content: "🚨"; /* 🚫 */
}

/* Liens vers le code source */
.source-links {
    position: fixed;
    bottom: 10px;
    right: 10px;
    font-size: 0.8em;
    opacity: 0.7;
    transition: opacity 0.2s;
    white-space: nowrap;
    text-align: right;
    max-width: 90%;
    z-index: 10;
    background: rgba(255, 255, 255, 0.8);
    padding: 5px;
    border-radius: 4px;
}
.source-links:hover {
    opacity: 1;
}
.source-links a {
    color: rgba(0, 0, 0, 0.5);
    text-decoration: none;
}
.source-links a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
    html {
        font-size: 16px;
    }
    body {
        font-size: 16px;
    }
    .container {
        margin: 0.8em;
        padding: 0.8em;
        width: calc(100% - 1.6em);
        box-sizing: border-box;
    }
    h1 {
        font-size: 1.6em;
        margin-top: 0.8em;
        margin-bottom: 0.8em;
    }
    h2 {
        font-size: 1.3em;
    }
    .radio-button,
    button {
        font-size: 1em;
        padding: 1.2em 0.8em;
    }
    .btn {
        font-size: 1em;
        padding: 1.2em 0.8em;
    }
    .result h2,
    .share h2 {
        padding: 1.2em;
    }
    .result .details,
    .share .details {
        font-size: 1em;
    }
    .description {
        font-size: 1em;
        line-height: 1.5;
    }
    input[type="text"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px; /* Prevent iOS zoom on focus */
        padding: 0.8em;
    }
    .source-links {
        font-size: 0.7em;
        position: static;
        margin-top: 2em;
        text-align: center;
        padding: 1em 0;
    }
}
